Commit Graph

38000 Commits

Author SHA1 Message Date
jackpoz
699c9ed414 DB/SAI: Add new view vw_smart_scripts_with_labels that shows labels instead of numbers from smart_scripts table
(cherry picked from commit c164c257ae)
2022-01-23 23:05:09 +01:00
jackpoz
b327414abb Core/Misc: Code cleanup
Remove more unused code in UpdateTime class

(cherry picked from commit 6c4f71c84b)
2022-01-23 22:49:21 +01:00
Trond B. Krokli
cf94f4a8ed Scripts/Borean Tundra: duplicate comment text (#25102)
(cherry picked from commit ebb9e1b4de)
2022-01-23 22:49:11 +01:00
Carbenium
ddeae5e7d2 tests: Add some basic tests for EventMap
(cherry picked from commit 7950275697)
2022-01-23 22:48:58 +01:00
Carbenium
f837f28171 dep: Add catch2 unit test framework and wire it up
To enable the test suite, make sure to configure CMake with -DBUILD_TESTING=1 , since it is disabled by default. The catch2 dependency will be downloaded during configure time.

Also add a new target "tests-common", which includes unit tests for the "common" project. To finally run the tests use the "test" target.

CircleCI: Run unit tests
(cherry picked from commit 6a28ee7b2a)
2022-01-23 22:48:35 +01:00
Giacomo Pozzoni
e8583d04f6 Core/Metric: Add more metrics about World::Update() loop (#25098)
* Core/Metric: Add more metrics about World::Update() loop

* Add new Performance profiling grafana dashboard

* Add new cmake setting WITHOUT_METRICS that disables all metrics

As new metrics are added, someone might want to disable them if unused.

* Add more metrics about World::Update() loop

* Remove old performance profiling features

Remove "server set difftime" command, "-RecordUpdateTimeDiffInterval" and "MinRecordUpdateTimeDiff" worldserver config settings and their related code.
The whole UpdateTime class could be removed too.

* Update and rename 2020_07_99_99_world.sql to 2020_07_24_00_world.sql

(cherry picked from commit 3c0ac7302f)
2022-01-23 22:45:25 +01:00
Giacomo Pozzoni
1dfcb7086e Core/Combat: Disable triggers entering combat (#25086)
* Core/Combat: Disable triggers entering combat

* Move check to database flags_extra flag in creature_template with value 0x00002000

* Fix Rotface puddle stalker too

* Rename 9999_99_99_99_world.sql to 2020_07_22_00_world.sql

(cherry picked from commit 6440c3bcac)
2022-01-23 22:35:00 +01:00
Peter Keresztes Schmidt
3499f518b5 EventMap: Remove GetNextEventTime and GetTimer methods (PR #25092)
(cherry picked from commit 6ab9922171)
2022-01-23 22:20:20 +01:00
Carbenium
330e7100cb Core/Scripts: Fix timing issue of EVENT_FLY_TO_RANDOM_PILLAR during Illidan encounter
The intention here is to add additional 30 seconds of delay to the current delay of EVENT_FLY_TO_RANDOM_PILLAR.
Instead of EventMap::GetNextEventTime, EventMap::GetTimeUntilEvent has to be used which returns the currently
scheduled delay until the event occurs.
EventMap::GetNextEventTime instead exposes the timer value internal to EventMap at which the event should occur.

(cherry picked from commit f1f251eb38)
2022-01-23 22:19:24 +01:00
Carbenium
c8a4cc8068 TaskScheduler: use randtime instead of custom implementation
(cherry picked from commit f773bf68e0)
2022-01-23 22:18:14 +01:00
Giacomo Pozzoni
8735c5f511 Dep/Boost: Remove unused thread library (#25076)
(cherry picked from commit cf5babc302)
2022-01-23 22:17:02 +01:00
Giacomo Pozzoni
509a70f57f Core/Threads: Replace Boost TLS with C++11 one (#15782)
* Core/Threads: Replace Boost TLS with C++11 one

Replace boost::thread_specific_ptr<T> thread-local storage with C++11 thread_local to remove libboost_thread dependency from common project

* Fix no-pch build

(cherry picked from commit 00b16992f1)
2022-01-23 22:16:45 +01:00
Peter Keresztes Schmidt
44ea32ace4 Build: Enable -Wimplicit-fallthrough on clang (#25056)
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs

Related: #25006

* Misc: Add some missing breaks (no-ops) to satisfy clang

Related: #25006
Closes #25055

* Build: Enable -Wimplicit-fallthrough on clang

Closes #25006
2022-01-23 22:16:15 +01:00
Peter Keresztes Schmidt
ad340466d0 Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs (#25054)
Related: #25006
(cherry picked from commit 85b5b842ca)
2022-01-23 22:02:03 +01:00
Giacomo Pozzoni
fda8a09766 Core/Misc: Replace boost::shared_mutex with std::shared_mutex (#24328)
* Core/Misc: Replace boost::shared_mutex with std::shared_mutex

* Remove std forward declarations

(cherry picked from commit 7032ee0bdb)
2022-01-23 21:51:47 +01:00
Giacomo Pozzoni
196a62c031 Dep/Boost: Set boost version to 1.67 on *nix and 1.70 on Windows (#25069)
(cherry picked from commit c54dc3ef92)
2022-01-23 21:37:33 +01:00
Giacomo Pozzoni
8834c5c724 Core/Metric: Log Map::Update() times (#25067)
* Core/Metric: Log Map::Update() times

* Add more performant version to reduce allocations when metrics are disabled

* Linux build fix

* Add metric stopwatch version that doesnt let users forget to _END it

* Fix linux build

* Code cleanup

* Add Map updates panel to General dashboard

* Add "Recent events" panel to General dashboard

* Apply latest codestyle changes

Co-authored-by: Shauren <shauren.trinity@gmail.com>
(cherry picked from commit 5eb742ee6a)
2022-01-23 21:36:28 +01:00
Treeston
d11c3807b3 Core/Time: Rename GetGameTime{System, Steady}Point methods
The names are a bit unhandy. Rename them (shorter but still meaningful).

GetGameTimeSystemPoint() -> GetSystemTime()
GetGameTimeSteadyPoint() -> Now()

Also add 2 new typedefs:

typedef std::chrono::steady_clock::time_point TimePoint;
typedef std::chrono::system_clock::time_point SystemTimePoint;

Closes #25042

(cherry picked from commit 896b68d5c2)
2022-01-23 21:36:03 +01:00
Peter Keresztes Schmidt
dfc1f08bd8 Misc: Remove some unneeded/duplicated includes (#25051)
(cherry picked from commit ddf16ae4d9)
2022-01-23 20:48:12 +01:00
Shauren
cd0b301779 Nopch fix
(cherry picked from commit c0ade2e98f)
2022-01-23 20:40:34 +01:00
Shauren
2b312c7bd2 Dep: Switch to boost process instead of old standalone version
(cherry picked from commit 524d167398)
2022-01-23 20:39:15 +01:00
Shauren
596bf2b772 Core/Misc: Replace boost::optional with std::optional part 2 2022-01-23 20:31:52 +01:00
Peter Keresztes Schmidt
770fbcca0c Core/Misc: Replace boost::optional with std::optional (#25047)
C++17 is already mandatory, so it's a safe thing to do

(cherry picked from commit 202fd41389)
2022-01-23 18:05:59 +01:00
Peter Keresztes Schmidt
cd86a015c4 Core/Util: Remove EventMap's non-std::chrono::duration based interface (#25049)
Closes #25012

(cherry picked from commit ce1e2c0f9b)
2022-01-23 16:39:31 +01:00
Shauren
15d59640fa Scripts/World: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
8417c7d815 Scripts/Zul'aman: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
5a53fa4b58 Scripts/Blackrock Spire: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
1ef00ccd10 Scripts/Stonecore: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
f0a7bc5267 Scripts/Halls of Origination: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
66641b6d22 Scripts/Blackrock Caverns: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
d07425e620 Scripts/Firelands: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
Shauren
bb29fb406e Scripts/Baradin Hold: Use std::chrono::duration overloads of EventMap 2022-01-23 16:39:31 +01:00
NoName
fdd06dc1dd Core/Misc: Port refactors 9fe6756cf2
* + For SMSG_DEATH_RELEASE_LOC
G3D::Vector3 -> TaggedPosition<Position::XYZ>
+ removed non 3.3.5 packets

Co-authored-by: Peter Keresztes Schmidt <carbenium@outlook.com>
Co-authored-by: Mogadischu <cgnad@live.de>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
(cherry picked from commit 9fe6756cf2)
2022-01-23 16:07:06 +01:00
Peter Keresztes Schmidt
54d3110ca7 Scripts/World+Pet: Use std::chrono::duration overloads of EventMap (#25017)
Contributes to #25012

(cherry picked from commit 0072fa922d)
2022-01-23 16:02:35 +01:00
Peter Keresztes Schmidt
ce8c0da4fe Scripts/Icecrown Citadel: Use std::chrono::duration overloads of EventMap (Part 2) (#25041)
Part 2: gunship battle and Sindragosa

Contributes to https://github.com/TrinityCore/TrinityCore/issues/25012

(cherry picked from commit 6968e7a1a1)
2022-01-23 16:02:25 +01:00
Peter Keresztes Schmidt
0195ec8945 Scripts/Icecrown Citadel: Use std::chrono::duration overloads of EventMap (#25036)
Part 1: without gunship battle and Sindragosa

Contributes to #25012

(cherry picked from commit 5eaff8a3bc)
2022-01-23 16:02:00 +01:00
Peter Keresztes Schmidt
253cbf5678 Scripts/Tempest Keep: Use std::chrono::duration overloads of EventMap (#25040)
Contributes to #25012

(cherry picked from commit 2d9c5979a6)
2022-01-23 16:01:09 +01:00
Peter Keresztes Schmidt
c3228cc252 Scripts/Utgarde Keep: Use std::chrono::duration overloads of EventMap (#25039)
Contributes to #25012

(cherry picked from commit f00ab389d6)
2022-01-23 16:00:59 +01:00
Peter Keresztes Schmidt
8e7c368220 Scripts/Magisters Terrace: Use std::chrono::duration overloads of EventMap (#25038)
Contributes to #25012

(cherry picked from commit 88314660b6)
2022-01-23 16:00:43 +01:00
Peter Keresztes Schmidt
d62b7c1e35 Core/CombatAI: Use std::chrono::duration overloads of EventMap (#25037)
Contributes to #25012

(cherry picked from commit bd837d4c3d)
2022-01-23 16:00:27 +01:00
Peter Keresztes Schmidt
b27c70aff2 Scripts/Ulduar: Use std::chrono::duration overloads of EventMap (#25035)
Contributes to #25012

(cherry picked from commit d4bce9f4d2)
2022-01-23 15:49:50 +01:00
Peter Keresztes Schmidt
b7d5a1653d Scripts/Nexus: Use std::chrono::duration overloads of EventMap (#25033)
Contributes to #25012

(cherry picked from commit 2f538258d9)
2022-01-23 15:49:27 +01:00
Peter Keresztes Schmidt
ef5f874cea Scripts/Naxxramas: Use std::chrono::duration overloads of EventMap (#25032)
Contributes to #25012

(cherry picked from commit 6eec0bc50f)
2022-01-23 15:49:09 +01:00
Peter Keresztes Schmidt
65e1b79547 Scripts/Isle of Conquest: Use std::chrono::duration overloads of EventMap (#25031)
Contributes to #25012

(cherry picked from commit 1a32b0f5b3)
2022-01-23 15:49:01 +01:00
Peter Keresztes Schmidt
3d9885a302 Scripts/Gundrak: Use std::chrono::duration overloads of EventMap (#25030)
Contributes to #25012

(cherry picked from commit 3a9b3259b8)
2022-01-23 15:48:52 +01:00
Peter Keresztes Schmidt
e6e4edd768 Scripts/Frozen Halls: Use std::chrono::duration overloads of EventMap (#25029)
Contributes to #25012

(cherry picked from commit 19ee4d6254)
2022-01-23 15:48:41 +01:00
Peter Keresztes Schmidt
0c6b6acda6 Scripts/Drak'Tharon Keep: Use std::chrono::duration overloads of EventMap (#25028)
Contributes to #25012

(cherry picked from commit 65e01053a8)
2022-01-23 15:48:25 +01:00
Peter Keresztes Schmidt
cd65f988bd Scripts/Chamber of Aspects: Use std::chrono::duration overloads of EventMap (#25027)
Contributes to #25012

(cherry picked from commit 42102871a7)
2022-01-23 15:48:17 +01:00
Peter Keresztes Schmidt
5507aa2f5e Scripts/Coilfang Reservoir: Use std::chrono::duration overloads of EventMap (#25025)
Contributes to #25012

(cherry picked from commit 5ed6c6a5c3)
2022-01-23 15:48:08 +01:00
Peter Keresztes Schmidt
7f948a3e23 Scripts/Hellfire Citadel: Use std::chrono::duration overloads of EventMap (#25024)
Contributes to #25012

(cherry picked from commit d00c95f26f)
2022-01-23 15:47:58 +01:00