Skip to content

Commit 69b312c

Browse files
committed
Merge branch '3.3.5-base_patch' into 3.3.5-aoe-loot-mail-excess
# Conflicts: # src/server/game/Entities/Player/Player.cpp
2 parents f00f1a7 + fb5c0f4 commit 69b312c

File tree

944 files changed

+42498
-27684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

944 files changed

+42498
-27684
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
codestyle_and_sql:
44
docker:
5-
- image: trinitycore/circle-ci:3.3.5-base-22.04
5+
- image: trinitycore/circle-ci:debian-12-builder
66
auth:
77
username: $DOCKERHUB_USERNAME
88
password: $DOCKERHUB_PASSWORD
@@ -38,7 +38,7 @@ jobs:
3838
cat sql/updates/world/3.3.5/*.sql | mysql -h 127.0.0.1 -uroot world
3939
pch:
4040
docker:
41-
- image: trinitycore/circle-ci:3.3.5-base-22.04
41+
- image: trinitycore/circle-ci:debian-12-builder
4242
auth:
4343
username: $DOCKERHUB_USERNAME
4444
password: $DOCKERHUB_PASSWORD
@@ -97,7 +97,7 @@ jobs:
9797
path: docker.tar.gz
9898
nopch:
9999
docker:
100-
- image: trinitycore/circle-ci:3.3.5-base-22.04
100+
- image: trinitycore/circle-ci:debian-12-builder
101101
auth:
102102
username: $DOCKERHUB_USERNAME
103103
password: $DOCKERHUB_PASSWORD

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Development of this project dates back to 2004, and was developed under various
1414
* MaNGOS project, 2005-2008, located at http://www.mangosproject.org
1515
* MaNGOS project, 2008-2011, located at http://getmangos.com
1616
* SD2 project, 2008-2009, located at http://getmangos.com
17-
* TrinityCore, 2008-2023, located at https://www.trinitycore.org/
17+
* TrinityCore, 2008-2025, located at https://www.trinitycore.org/
1818

1919
## Authorship of the code
2020
Authorship is assigned for each commit within the git history, which is stored in these git repositories:

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ project(TrinityCore)
2121
cmake_policy(SET CMP0005 NEW)
2222
cmake_policy(SET CMP0043 NEW) # Ignore COMPILE_DEFINITIONS_<Config> properties
2323
cmake_policy(SET CMP0054 NEW) # Only interpret if() arguments as variables or keywords when unquoted - prevents intepreting if(SOME_STRING_VARIABLE MATCHES "MSVC") as if(SOME_STRING_VARIABLE MATCHES "1")
24+
cmake_policy(SET CMP0067 NEW) # Honor language standard in try_compile() source-file signature
2425
cmake_policy(SET CMP0074 NEW) # find_package() uses <PackageName>_ROOT variables
2526

2627
if(POLICY CMP0144)
2728
cmake_policy(SET CMP0144 NEW) # find_package() uses upper-case <PACKAGENAME>_ROOT variables
2829
endif()
2930

31+
if(POLICY CMP0153)
32+
cmake_policy(SET CMP0153 NEW) # The exec_program() command should not be called
33+
endif()
34+
3035
# Set RPATH-handing (CMake parameters)
3136
set(CMAKE_SKIP_BUILD_RPATH 0)
3237
set(CMAKE_BUILD_WITH_INSTALL_RPATH 0)

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ clone_depth: 1
44
init:
55
- ps: ''
66
environment:
7-
BOOST_ROOT: C:\Libraries\boost_1_83_0
7+
BOOST_ROOT: C:\Libraries\boost_1_85_0
88
MYSQL_ROOT_DIR: C:\Program Files\MySQL\MySQL Server 8.0
99
OPENSSL_ROOT_DIR: C:\OpenSSL-v32-Win64
1010
build_script:

cmake/compiler/clang/settings.cmake

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# Set build-directive (used in core to tell which buildtype we used)
2-
target_compile_definitions(trinity-compile-option-interface
3-
INTERFACE
4-
-D_BUILD_DIRECTIVE="$<CONFIG>")
5-
61
set(CLANG_EXPECTED_VERSION 11.0.0)
72
if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
83
# apple doesnt like to do the sane thing which would be to use the same version numbering as regular clang
94
# version number pulled from https://en.wikipedia.org/wiki/Xcode#Toolchain_versions for row matching LLVM 11
105
set(CLANG_EXPECTED_VERSION 12.0.5)
6+
# enable -fpch-instantiate-templates for AppleClang (by default it is active only for regular clang)
7+
set(CMAKE_C_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
8+
set(CMAKE_CXX_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
119
endif()
1210

1311
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_EXPECTED_VERSION)
@@ -38,7 +36,7 @@ if (NOT CLANG_HAVE_PROPER_CHARCONV)
3836
message(STATUS "Clang: Detected from_chars bug for 64-bit integers, workaround enabled")
3937
target_compile_definitions(trinity-compile-option-interface
4038
INTERFACE
41-
-DTRINITY_NEED_CHARCONV_WORKAROUND)
39+
TRINITY_NEED_CHARCONV_WORKAROUND)
4240
endif()
4341

4442
if(WITH_WARNINGS)
@@ -51,7 +49,8 @@ if(WITH_WARNINGS)
5149
-Winit-self
5250
-Wfatal-errors
5351
-Wno-mismatched-tags
54-
-Woverloaded-virtual)
52+
-Woverloaded-virtual
53+
-Wno-missing-field-initializers) # this warning is useless when combined with structure members that have default initializers
5554

5655
message(STATUS "Clang: All warnings enabled")
5756
endif()

cmake/compiler/gcc/settings.cmake

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# Set build-directive (used in core to tell which buildtype we used)
2-
target_compile_definitions(trinity-compile-option-interface
3-
INTERFACE
4-
-D_BUILD_DIRECTIVE="$<CONFIG>")
5-
61
set(GCC_EXPECTED_VERSION 11.1.0)
72

83
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS GCC_EXPECTED_VERSION)
@@ -11,6 +6,10 @@ else()
116
message(STATUS "GCC: Minimum version required is ${GCC_EXPECTED_VERSION}, found ${CMAKE_CXX_COMPILER_VERSION} - ok!")
127
endif()
138

9+
target_compile_options(trinity-compile-option-interface
10+
INTERFACE
11+
-fno-delete-null-pointer-checks)
12+
1413
if(PLATFORM EQUAL 32)
1514
# Required on 32-bit systems to enable SSE2 (standard on x64)
1615
target_compile_options(trinity-compile-option-interface
@@ -21,8 +20,8 @@ endif()
2120
if(TRINITY_SYSTEM_PROCESSOR MATCHES "x86|amd64")
2221
target_compile_definitions(trinity-compile-option-interface
2322
INTERFACE
24-
-DHAVE_SSE2
25-
-D__SSE2__)
23+
HAVE_SSE2
24+
__SSE2__)
2625
message(STATUS "GCC: SFMT enabled, SSE2 flags forced")
2726
endif()
2827

@@ -36,7 +35,8 @@ if(WITH_WARNINGS)
3635
-Winvalid-pch
3736
-Wfatal-errors
3837
-Woverloaded-virtual
39-
-Wno-missing-field-initializers) # this warning is useless when combined with structure members that have default initializers
38+
-Wno-missing-field-initializers # this warning is useless when combined with structure members that have default initializers
39+
-Wno-maybe-uninitialized) # this warning causes many false positives with std::optional
4040

4141
message(STATUS "GCC: All warnings enabled")
4242
endif()

cmake/compiler/icc/settings.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
target_compile_definitions(trinity-compile-option-interface
2-
INTERFACE
3-
-D_BUILD_DIRECTIVE="$<CONFIG>")
4-
51
if(PLATFORM EQUAL 32)
62
target_compile_options(trinity-compile-option-interface
73
INTERFACE

cmake/compiler/mingw/settings.cmake

Lines changed: 0 additions & 42 deletions
This file was deleted.

cmake/compiler/msvc/settings.cmake

Lines changed: 26 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms)
2-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
3-
41
set(MSVC_EXPECTED_VERSION 19.32)
52
set(MSVC_EXPECTED_VERSION_STRING "Microsoft Visual Studio 2022 17.2")
63

@@ -31,21 +28,7 @@ target_compile_options(trinity-compile-option-interface
3128
INTERFACE
3229
/permissive-)
3330

34-
# set up output paths ofr static libraries etc (commented out - shown here as an example only)
35-
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
36-
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
37-
38-
if(PLATFORM EQUAL 64)
39-
# This definition is necessary to work around a bug with Intellisense described
40-
# here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper
41-
# debugger functionality.
42-
target_compile_definitions(trinity-compile-option-interface
43-
INTERFACE
44-
-D_WIN64)
45-
46-
message(STATUS "MSVC: 64-bit platform, enforced -D_WIN64 parameter")
47-
48-
else()
31+
if(PLATFORM EQUAL 32)
4932
# mark 32 bit executables large address aware so they can use > 2GB address space
5033
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
5134
message(STATUS "MSVC: Enabled large address awareness")
@@ -59,24 +42,19 @@ else()
5942
message(STATUS "MSVC: Disabled Safe Exception Handlers for debug builds")
6043
endif()
6144

62-
# Set build-directive (used in core to tell which buildtype we used)
63-
# msbuild/devenv don't set CMAKE_MAKE_PROGRAM, you can choose build type from a dropdown after generating projects
6445
if("${CMAKE_MAKE_PROGRAM}" MATCHES "MSBuild")
65-
target_compile_definitions(trinity-compile-option-interface
46+
# multithreaded compiling on VS
47+
target_compile_options(trinity-compile-option-interface
6648
INTERFACE
67-
-D_BUILD_DIRECTIVE="$(ConfigurationName)")
49+
/MP)
6850
else()
69-
# while all make-like generators do (nmake, ninja)
70-
target_compile_definitions(trinity-compile-option-interface
51+
# Forces writes to the PDB file to be serialized through mspdbsrv.exe (/FS)
52+
# Enable faster PDB generation in parallel builds by minimizing RPC calls to mspdbsrv.exe (/Zf)
53+
target_compile_options(trinity-compile-option-interface
7154
INTERFACE
72-
-D_BUILD_DIRECTIVE="$<CONFIG>")
55+
$<$<CONFIG:Debug,RelWithDebInfo>:/FS /Zf>)
7356
endif()
7457

75-
# multithreaded compiling on VS
76-
target_compile_options(trinity-compile-option-interface
77-
INTERFACE
78-
/MP)
79-
8058
if((PLATFORM EQUAL 64) OR (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.23026.0) OR BUILD_SHARED_LIBS)
8159
# Enable extended object support
8260
target_compile_options(trinity-compile-option-interface
@@ -86,36 +64,36 @@ if((PLATFORM EQUAL 64) OR (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.2302
8664
message(STATUS "MSVC: Enabled increased number of sections in object files")
8765
endif()
8866

89-
# /Zc:throwingNew.
90-
# When you specify Zc:throwingNew on the command line, it instructs the compiler to assume
91-
# that the program will eventually be linked with a conforming operator new implementation,
92-
# and can omit all of these extra null checks from your program.
93-
# http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx
94-
target_compile_options(trinity-compile-option-interface
95-
INTERFACE
96-
/Zc:throwingNew)
67+
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
68+
target_compile_options(trinity-compile-option-interface
69+
INTERFACE
70+
/Zc:__cplusplus # Enable updated __cplusplus macro value
71+
/Zc:preprocessor # Enable preprocessor conformance mode
72+
/Zc:templateScope # Check template parameter shadowing
73+
/Zc:throwingNew) # Assume operator new throws
74+
endif()
9775

9876
# Define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES - eliminates the warning by changing the strcpy call to strcpy_s, which prevents buffer overruns
9977
target_compile_definitions(trinity-compile-option-interface
10078
INTERFACE
101-
-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
79+
_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
10280
message(STATUS "MSVC: Overloaded standard names")
10381

10482
# Ignore warnings about older, less secure functions
10583
target_compile_definitions(trinity-compile-option-interface
10684
INTERFACE
107-
-D_CRT_SECURE_NO_WARNINGS)
85+
_CRT_SECURE_NO_WARNINGS)
10886
message(STATUS "MSVC: Disabled NON-SECURE warnings")
10987

11088
# Ignore warnings about POSIX deprecation
11189
target_compile_definitions(trinity-compile-option-interface
11290
INTERFACE
113-
-D_CRT_NONSTDC_NO_WARNINGS)
91+
_CRT_NONSTDC_NO_WARNINGS)
11492

11593
# Force math constants like M_PI to be available
11694
target_compile_definitions(trinity-compile-option-interface
11795
INTERFACE
118-
-D_USE_MATH_DEFINES)
96+
_USE_MATH_DEFINES)
11997

12098
message(STATUS "MSVC: Disabled POSIX warnings")
12199

@@ -147,14 +125,15 @@ if(BUILD_SHARED_LIBS)
147125
message(STATUS "MSVC: Enabled shared linking")
148126
endif()
149127

150-
# Move some warnings that are enabled for other compilers from level 4 to level 3
128+
# Move some warnings that are enabled for other compilers from level 4 to level 3 and enable some warnings which are off by default
151129
target_compile_options(trinity-compile-option-interface
152130
INTERFACE
153-
/w34100 # C4100 'identifier' : unreferenced formal parameter
131+
/w15038 # C5038: data member 'member1' will be initialized after data member 'member2'
132+
/w34100 # C4100: 'identifier' : unreferenced formal parameter
154133
/w34101 # C4101: 'identifier' : unreferenced local variable
155134
/w34189 # C4189: 'identifier' : local variable is initialized but not referenced
156135
/w34389 # C4389: 'equality-operator' : signed/unsigned mismatch
157-
/w35054) # C5054: 'operator 'operator-name': deprecated between enumerations of different types'
136+
/w35054) # C5054: 'operator 'operator-name': deprecated between enumerations of different types'
158137

159138
# Enable and treat as errors the following warnings to easily detect virtual function signature failures:
160139
# 'function' : member function does not override any base class virtual member function
@@ -167,8 +146,8 @@ target_compile_options(trinity-compile-option-interface
167146
if(ASAN)
168147
target_compile_definitions(trinity-compile-option-interface
169148
INTERFACE
170-
-D_DISABLE_STRING_ANNOTATION
171-
-D_DISABLE_VECTOR_ANNOTATION)
149+
_DISABLE_STRING_ANNOTATION
150+
_DISABLE_VECTOR_ANNOTATION)
172151

173152
target_compile_options(trinity-compile-option-interface
174153
INTERFACE

cmake/genrev.cmake

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# This is done EACH compile so they can be alerted about the consequences.
1313

1414
if(NOT BUILDDIR)
15-
# Workaround for funny MSVC behaviour - this segment is only used when using cmake gui
15+
# Workaround for cmake script mode
1616
set(BUILDDIR ${CMAKE_BINARY_DIR})
1717
endif()
1818

@@ -122,12 +122,29 @@ set(rev_month ${CMAKE_MATCH_2})
122122
set(rev_day ${CMAKE_MATCH_3})
123123

124124
# Create the actual revision_data.h file from the above params
125-
if(NOT "${rev_hash_cached}" STREQUAL "${rev_hash}" OR NOT "${rev_branch_cached}" STREQUAL "${rev_branch}" OR NOT EXISTS "${BUILDDIR}/revision_data.h")
126-
configure_file(
127-
"${CMAKE_SOURCE_DIR}/revision_data.h.in.cmake"
128-
"${BUILDDIR}/revision_data.h"
129-
@ONLY
125+
cmake_host_system_information(RESULT TRINITY_BUILD_HOST_SYSTEM QUERY OS_NAME)
126+
cmake_host_system_information(RESULT TRINITY_BUILD_HOST_DISTRO QUERY DISTRIB_INFO)
127+
cmake_host_system_information(RESULT TRINITY_BUILD_HOST_SYSTEM_RELEASE QUERY OS_RELEASE)
128+
# on windows OS_RELEASE contains sub-type string tag like "Professional" instead of a version number and OS_VERSION has only build number
129+
# so we grab that with Get-CimInstance powershell cmdlet
130+
if(WIN32)
131+
execute_process(
132+
COMMAND powershell -NoProfile -Command "$v=(Get-CimInstance -ClassName Win32_OperatingSystem); '{0} ({1})' -f $v.Caption, $v.Version"
133+
OUTPUT_VARIABLE TRINITY_BUILD_HOST_SYSTEM_RELEASE
134+
OUTPUT_STRIP_TRAILING_WHITESPACE
130135
)
131-
set(rev_hash_cached "${rev_hash}" CACHE INTERNAL "Cached commit-hash")
132-
set(rev_branch_cached "${rev_branch}" CACHE INTERNAL "Cached branch name")
136+
# Remove "Microsoft Windows" from the result
137+
string(REGEX REPLACE "^.* Windows " "" TRINITY_BUILD_HOST_SYSTEM_RELEASE ${TRINITY_BUILD_HOST_SYSTEM_RELEASE})
133138
endif()
139+
140+
if(CMAKE_SCRIPT_MODE_FILE)
141+
# hack for CMAKE_SYSTEM_PROCESSOR missing in script mode
142+
set(CMAKE_PLATFORM_INFO_DIR ${BUILDDIR}${CMAKE_FILES_DIRECTORY})
143+
include(${CMAKE_ROOT}/Modules/CMakeDetermineSystem.cmake)
144+
endif()
145+
146+
configure_file(
147+
"${CMAKE_SOURCE_DIR}/revision_data.h.in.cmake"
148+
"${BUILDDIR}/revision_data.h"
149+
@ONLY
150+
)

0 commit comments

Comments
 (0)