Skip to content

Commit

Permalink
Merge branch 'azerothcore:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSCREWEDSoftware authored Jan 23, 2025
2 parents e1e8949 + 3652240 commit c6f7763
Show file tree
Hide file tree
Showing 48 changed files with 1,171 additions and 923 deletions.
24 changes: 24 additions & 0 deletions apps/codestyle/codestyle-sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Multiple blank lines check": "Passed",
"Trailing whitespace check": "Passed",
"SQL codestyle check": "Passed",
"INSERT safety usage check": "Passed",
"Missing semicolon check": "Passed"
}

Expand Down Expand Up @@ -43,6 +44,7 @@ def parsing_file(files: list) -> None:
multiple_blank_lines_check(file, file_path)
trailing_whitespace_check(file, file_path)
sql_check(file, file_path)
insert_safety_check(file, file_path)
semicolon_check(file, file_path)
except UnicodeDecodeError:
print(f"\nCould not decode file {file_path}")
Expand Down Expand Up @@ -108,6 +110,10 @@ def sql_check(file: io, file_path: str) -> None:
print(
f"DON'T EDIT broadcast_text TABLE UNLESS YOU KNOW WHAT YOU ARE DOING!\nThis error can safely be ignored if the changes are approved to be sniffed: {file_path} at line {line_number}")
check_failed = True
if "EntryOrGuid" in line:
print(
f"Please use entryorguid syntax instead of EntryOrgGuid in {file_path} at line {line_number}\nWe recommend to use keira to have the right syntax in auto-query generation")
check_failed = True
if [match for match in [';;'] if match in line]:
print(
f"Double semicolon (;;) found in {file_path} at line {line_number}")
Expand All @@ -128,6 +134,24 @@ def sql_check(file: io, file_path: str) -> None:
error_handler = True
results["SQL codestyle check"] = "Failed"

def insert_safety_check(file: io, file_path: str) -> None:
global error_handler, results
file.seek(0) # Reset file pointer to the beginning
check_failed = False
previous_line = ""

# Parse all the file
for line_number, line in enumerate(file, start = 1):
if "INSERT" in line and "DELETE" not in previous_line:
print(f"No DELETE keyword found after the INSERT in {file_path} at line {line_number}\nIf this error is intended, please advert a maintainer")
check_failed = True
previous_line = line

# Handle the script error and update the result output
if check_failed:
error_handler = True
results["INSERT safety usage check"] = "Failed"

def semicolon_check(file: io, file_path: str) -> None:
global error_handler, results
file.seek(0) # Reset file pointer to the beginning
Expand Down
49 changes: 37 additions & 12 deletions apps/docker/Dockerfile.dev-server
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
#=================================================================

FROM ubuntu:22.04 as dev
FROM ubuntu:24.04 as dev
ARG USER_ID=1000
ARG GROUP_ID=1000
ARG DOCKER_USER=acore
Expand All @@ -29,13 +29,37 @@ ENV TZ=$TZ
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -y \
gdb gdbserver git dos2unix lsb-core sudo curl unzip \
make cmake clang libmysqlclient-dev libboost-all-dev \
build-essential libtool cmake-data openssl libgoogle-perftools-dev google-perftools \
libssl-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev mysql-client \
libncurses5-dev ccache tzdata \
&& rm -rf /var/lib/apt/lists/*
&& apt-get install -y --no-install-recommends \
# Classic install
git \
clang lldb lld clang-format clang-tidy \
make cmake \
gcc g++ \
libmysqlclient-dev \
libssl-dev \
libbz2-dev \
libreadline-dev \
libncurses-dev \
mysql-server \
libboost-all-dev \
# Other
curl \
unzip \
sudo \
gdb gdbserver \
libtool \
build-essential \
cmake-data \
openssl \
google-perftools libgoogle-perftools-dev \
libmysql++-dev \
ccache \
tzdata \
# Utility for column command used by dashboard
util-linux \
# Certificates for downloading client data
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Ensure git will work with the AzerothCore source directory
RUN git config --global --add safe.directory /azerothcore
Expand All @@ -45,10 +69,11 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata

# Create a non-root user
RUN addgroup --gid "$GROUP_ID" "$DOCKER_USER" && \
adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \
passwd -d "$DOCKER_USER" && \
echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN userdel --remove ubuntu \
&& addgroup --gid "$GROUP_ID" "$DOCKER_USER" \
&& adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" \
&& passwd -d "$DOCKER_USER" \
&& echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers

# must be created to set the correct permissions on them
RUN mkdir -p \
Expand Down
4 changes: 4 additions & 0 deletions data/sql/updates/db_world/2025_01_18_01.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- DB update 2025_01_18_00 -> 2025_01_18_01

-- Change Unit Flags (IMMUNE_TO_PC, IMMUNE_TO_NPC)
UPDATE `creature_template` SET `unit_flags` = `unit_flags`|768 WHERE `entry` IN (25465);
Loading

0 comments on commit c6f7763

Please sign in to comment.