Commit Graph
27204 Commits
Author SHA1 Message Date
Carbenium d6c998a1a8 Core/Updater: Fix detection of the mysql binary when a directory is given as path
This ensures that we never pass a directory path StartProcess which results in a crash.

Closes #25216

(cherry picked from commit 98b1b20d6beea5e2fdea7e404e8d880953d4b2fb)
2022-01-26 18:41:14 +01:00
jackpoz a706c60828 Core/Misc: Code cleanup
(cherry picked from commit 3c28573d02db98ae8d7a41e04b9715da0556836b)
2022-01-26 18:12:13 +01:00
Jinnaix adfb050551 Core/Unit: Creatures' minions now engage in combat if their controller is attacked (PR #25219)
Closes #24340

(cherry picked from commit db9072a183cd93014d708d67ae3a762fdbf5d095)
2022-01-26 18:10:57 +01:00
jackpoz 676d877296 Core/Battlegrounds: Fix error messages in Isle of Conquest
Fixes #24032

(cherry picked from commit 02a018ea1394452896ecdd87c98df5fc8655046d)
2022-01-26 16:36:37 +01:00
jackpoz b3545479bf Core/SAI: Fix creatures casting spells while moving with flag SMARTCAST_COMBAT_MOVE
Fixes #24019

(cherry picked from commit 2910d0fb2436d9865d792ef92cb415f831a0af93)
2022-01-26 16:23:15 +01:00
Giacomo Pozzoni ffd85f9139 Scripts/Comamnds: Improve ".debug objectcount" command (#25208)
* Scripts/Comamnds: Improve ".debug objectcount" command

Include the top 5 most common creatures in the map

* Use C++ features to copy data

* Fix build warnings

* Update src/server/scripts/Commands/cs_debug.cpp

Co-authored-by: Shauren <[email protected]>

* Update src/server/scripts/Commands/cs_debug.cpp

Co-authored-by: Shauren <[email protected]>

* Update src/server/scripts/Commands/cs_debug.cpp

Co-authored-by: Shauren <[email protected]>

* Move CreatureCountWorker out of function and use template for unhandled cases

* Code cleanup

Co-authored-by: Shauren <[email protected]>
(cherry picked from commit bd5e832a648aadf1d1be94f913ea00b67398f249)
2022-01-26 16:22:00 +01:00
Treeston 7603dacc64 Core/Authserver: Deprecation of sha_pass_hash (PR #25138)
see also #25157

(cherry picked from commit 44a3aad0af4bdd132b8761761dc83df2d7d6c601)
2022-01-26 16:21:43 +01:00
jackpoz a23215c73d Scripts/Kologarn: Apply CREATURE_FLAG_EXTRA_NO_COMBAT on NPC_ARM_SWEEP_STALKER and NPC_RUBBLE_STALKER
(cherry picked from commit 6ad6d9e67069ef048c10afbdd52627b8c765a010)
2022-01-26 14:39:22 +01:00
Gildor 3780c05285 Scripts/Naxxramas: Frogger event improvements (#25202)
* Scripts/Naxxramas: Frogger event improvements
* Prevent Living Poison accumulation
* Now Living Poison cast Explode

* check for a nearby player

* move event to the frogger trigger's AI

* Initialize and removing unnecessary things

* applying suggestions

* remove unnecessary header

* Rename 9999_99_99_99_world.sql to 2020_08_05_00_world.sql

(cherry picked from commit 174ac958009222aeef83520101a28963f8c63b0e)
2022-01-26 14:38:57 +01:00
Ovahlord 785b6f294f Scripts/World: updated Training Dummy script to modern model and removed pointless GameTime shenanigans
(cherry picked from commit 9bf57958e36721fa301f62c4a5c6bd88c58edc28)
2022-01-26 14:37:31 +01:00
Carbenium c302ace100 Scripts/AzjolNerub: Fix potential error in pound spell script
Cast damage spell in AfterEffectApply instead OnEffectHitTarget. This avoids the scenario where we try to apply an aura to a potential dead target.

Ref #21856

(cherry picked from commit 0dd4b685df53d9b61a53aaf3a577c2a9ed8cdd47)
2022-01-26 14:37:05 +01:00
Treeston fa8ab6eb98 Core/Common: Move old-style pointer+size HexStr methods to Trinity::Impl where they can't hurt anyone
(cherry picked from commit 7b8b999516a824b0c417631a77f133eb47b8b2f4)
2022-01-26 14:36:42 +01:00
Shauren 58d199db48 Core/Misc: Fix compile errors found with msvc /permissive-
(cherry picked from commit b3db50a3b41b2db209327387f59afa1c40532773)
2022-01-26 14:20:13 +01:00
jackpoz 7ea19b675f Core/Metric: Require WITH_DETAILED_METRICS CMake flag for MMaps metric
(cherry picked from commit 8ad6bd8a9ba45ef22ed0275fd402da17666d8522)
2022-01-26 14:07:00 +01:00
Giacomo Pozzoni 864d775280 Core/Misc: Fix static analysis issues (#25194)
(cherry picked from commit 07fd84b679fd6958b7e669a96c78783875e1b949)
2022-01-26 14:06:40 +01:00
Trond B. Krokli c324f954ce Scripts/Outland: Convert 'Captain Tyralius' to SAI (#25188)
Closes #24676

(cherry picked from commit 7f2874a7aceb13f5c8898acbeb7f5a296eb7d610)
2022-01-26 13:23:09 +01:00
Peter Keresztes Schmidt 43591bb4d5 Scripts/AzjolNerub: Update Anub'Arak encounter to current coding standards (#25192)
* Scripts/AzjolNerub: Update Anub'Arak to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Darter to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Assassin to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Guardian to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Venomancer to current coding standards

* no functional changes

* Scripts/AzjolNerub: Update Anub'Arak Impale Target to current coding standards

* Scripts/AzjolNerub: Update Anub'Arak Pound spell to current coding standards

* Scripts/AzjolNerub: Update Anub'Arak carrion beetles aura script to current coding standards

(cherry picked from commit dab8768c183dc43f970187a65961fc8fce647c29)
2022-01-24 22:32:11 +01:00
Peter Keresztes Schmidt 5b1ba7b503 Scripts/Gundrak: Update Slad'ran encounter to current coding standards (#25180)
* Scripts/Gundrak: Update Slad'Ran's script to use TaskScheduler

* No functional changes

* Scripts/Gundrak: Update Slad'Ran's adds to use TaskScheduler

* No functional changes

(cherry picked from commit 7abe9d66d049204240060f1976c51ff2297bf266)
2022-01-24 21:58:00 +01:00
Peter Keresztes Schmidt 35a348dfdb Scripts/Gundrak: Update Drakkari Colossus encounter to current coding standards (#25182)
* Scripts/Gundrak: Update Drakkari Colossus to current coding standards

* no functional changes

* Scripts/Gundrak: Update Drakkari Elemental to current coding standards

* no functional changes

* Scripts/Gundrak: Update Living Mojo to current coding standards

* no functional changes

(cherry picked from commit dd8666f38d6aad6401e8e303c57c62255856f5a4)
2022-01-24 21:55:10 +01:00
Peter Keresztes Schmidt 0c65abe7a0 Scripts/MoltenCore: Update Golemagg encounter to current coding standards (#25183)
* Scripts/MoltenCore: Update Golemagg to current coding standards

* no functional changes

* Scripts/MoltenCore: Update Core Ranger to current coding standards

* no functional changes

(cherry picked from commit c88234727b47c037557eba6db8ae8ef1dee4eed7)
2022-01-24 21:54:10 +01:00
Carbenium 7e0fb710ad Scripts/AhnKahet: Update Herald Volazj to current coding standards
* convert to BossAI
* no functional changes

(cherry picked from commit 90543fd41db309d924a3d45939bd23cffb9f5b67)
2022-01-24 21:53:52 +01:00
Carbenium 18e5e1ef43 Scripts/AV: Update Vanndar's script to use TaskScheduler
* No functional changes

(cherry picked from commit 799d5376d8d7e2c9c0fc1e27cfadf2669a8724d0)
2022-01-24 21:35:52 +01:00
Carbenium 8809d54ca2 Core/Common: Merge TimeTrackerSmall with TimeTracker
(cherry picked from commit 228696bf80bcd55d35445cd24ae119020c310f88)
2022-01-24 21:34:36 +01:00
Carbenium 35e0002df3 Core/Common: Add a std::chrono interface to TimeTrackerSmall
New methods:
TimeTrackerSmall(Milliseconds expiry);
void Update(Milliseconds diff);
void Reset(Milliseconds expiry)
Milliseconds GetExpiry() const

Removed methods:
int32 GetExpiry() const

Also add basic unit tests.

Core/Scripts: Use std::chrono interface of TimeTrackerSmall

(cherry picked from commit e55516348dbabaa8c9d559426315f3f70967acaa)
2022-01-24 21:25:47 +01:00
Shauren d5dcf02196 Core/DBLayer: Add nicer api for SQLQueryHolders
(cherry picked from commit 9b806c6b5d9e83f8614523317a44742954f97744)
2022-01-24 21:21:37 +01:00
Giacomo Pozzoni 61bf51874d Core/Misc: Fix static analysis issues (#25178)
(cherry picked from commit 7cf122fc2a604bae77d0b935536c41ec9203e62d)
2022-01-24 20:21:25 +01:00
Treeston 23ad14526c Core/Common: Allow config settings to be loaded as optional (PR #25137)
If the config setting is not present, returns the default without issuing a warning.

(cherry picked from commit 5ad064976edfc931cdda6faffe723d7c3dfb0ae4)
2022-01-24 15:08:46 +01:00
Jinnaix ab7680157b Scripts/BlackrockSpire: Fix encage event of Pyroguard encounter (#25177)
(cherry picked from commit e3aa87641f08ecaa42ebef1915d7de88dc73ef25)
2022-01-24 15:05:20 +01:00
Giacomo Pozzoni 736b9ac112 Log sync db queries in World::Update() loop (#25174)
* Core/Misc: Log sync queries on critical path

* Fix build

* Rename

* Fix warning

* Fix no-pch

* Change WarnAboutSyncQueries() to be header-only

(cherry picked from commit deceb11b5fc52c8036f249d628ccc69ca5d022b3)
2022-01-24 14:58:08 +01:00
Shauren 6d9a084036 Core/Commands: Initialize commands on startup instead of first use
(cherry picked from commit 0fc7b50c041131b3d6dbc011f29d6547c9ca0660)
2022-01-24 14:46:14 +01:00
Shauren a9b4f9aca0 Core/Mail: Load mails at login instead of on demand when queried by packets (logging in always sends one of the packets that cause mail loading anyway)
(cherry picked from commit 57eaab80d9e1f6f25274f376da16e1f2f67ab4bc)
2022-01-24 14:45:54 +01:00
Shauren 54a6e603ff Core/Misc: Replace database query in WorldSession::HandleAddFriendOpcode with async version
(cherry picked from commit 2f0893d279ddab86ae7c3e4fd1d7a47b15e938f7)
2022-01-24 13:38:40 +01:00
Giacomo Pozzoni 1977d26050 Core/SAI: Ignore SAI while evading (#25108)
(cherry picked from commit 420b21be9860367c82537634fb792a4af3d9be9b)
2022-01-24 13:21:46 +01:00
Gildor 8847f37b5b Core/Loot: Prevent loot already looted item (#25084)
(cherry picked from commit 586c00fe2e226da99968ebe763d3226c6134658c)
2022-01-24 13:20:49 +01:00
Trond B. Krokli fa444aca66 Scripts/Quest: Force of Neltharaku quest credit (#24807)
* Scripts/Quest: Force of Neltharaku quest credit

**Description:**

Suggested solution to resolve the kill credit double cast issue
in the quest "The Force of Neltharaku" (10854).

by Rushor

**Changes proposed:**

- Remove duplicate spell casts in the zone quest script
- Remove commented-out script section
- Set a couple of unit flags (anim/stand/hover)
- Move return new creature script override to end of script
- Move PlayerGUID, FlyTimer, and Tapped to Private
- Add DB flight movement control to Enslaved Netherwing Drake
- Add SpellMgr MaxAffectedTargets = 1 for spell 38762
- Add movement enum POINT_MOVE_UP
- Add missing enum for quest ID

**Target branch(es):** 3.3.5/master

- [X] 3.3.5
- [X] master

**Issues addressed:** Closes #24796

**Tests performed:** (Does it build, tested in-game, etc.)

Pending for now.

**Known issues and TODO list:** (add/remove lines as needed)

- [X] Open PR in draft mode until testing is cleared
- [ ] Compile and create local server
- [ ] Test changes on local server

* Rename 9999_99_99_99_world.sql to 2020_07_29_00_world.sql

Co-authored-by: Rushor <[email protected]>
Co-authored-by: Giacomo Pozzoni <[email protected]>
(cherry picked from commit e0dae8feb6607b5190d14b56ecfc10bbfa667c95)
2022-01-24 13:19:36 +01:00
Ovah 9c38dc2367 Core/World: added startup log outputs for query cache initialization for detailed information.
* the console will now throw a log when the feature is disabled
* additionally the console will now print how long it took to initialize

(cherry picked from commit 210f552ac56979430f1349006c1945b29883a2bc)
2022-01-24 13:15:42 +01:00
Shauren d2cde75ab2 Core/Networking: Fixed authserver socket read handlers being called on incorrect thread
(cherry picked from commit 3ad05386c844438af0dda56bbb46fa665d870c5c)
2022-01-24 13:15:13 +01:00
jackpoz f220e46c50 Core/Metric: Add new metric in World::UpdateSessions()
Add new metric about how long adding sessions took

(cherry picked from commit 5cd93df9eec1d1b310916fefecc9282e02e9cf2d)
2022-01-24 13:12:21 +01:00
Carbenium b3f2ff97ff Core/CreatureAI: std::chrono-ify DoSummon* methods
(cherry picked from commit 1245833cdd9988a2ac9c3a9374b40e76a53d889a)
2022-01-24 13:11:13 +01:00
Giacomo Pozzoni 8350985975 Core/Metric: Log detailed metrics about each opcode handler (#25153)
* Core/Metric: Log detailed metrics about each opcode handler

* Add new panel to Performance profiling dashboard and use fill(0) instead of fill(none)

* Add new settings Metric.Threshold.* to be able to specify the minimum threshold for the specified metrics

* Update dashboard

* Change thresholds to be required to send the metrics. A TC_METRIC_DETAILED_TIMER metric with an expected threshold not configured will be ignored

* Use typedef Milliseconds

* Refresh realms on load

(cherry picked from commit 8a2c79c850199a73fd431d04f83d6aa89733060d)
2022-01-24 13:02:38 +01:00
Shauren c7899c1e76 Core/WorldObject: std::chrono-ify SummonPersonalClone 2022-01-24 12:57:40 +01:00
Carbenium 82fce41852 Core/WorldObject: Replace non-std::chrono SummonGameObject overloads
Also fix intended despawn time of GOs used by the "Engineering a Disaster" quest

(cherry picked from commit 8642aaaf9268364454b409db7eb62f31210e6d6c)
2022-01-24 12:55:43 +01:00
Carbenium 217c2d9ef3 Core/WorldObject: Replace non-std::chrono SummonTrigger overloads
(cherry picked from commit 3620b47c412d88cc2e0ab10e2654913e5487c8ac)
2022-01-24 12:47:56 +01:00
Carbenium 3bba8d50b1 Core/WorldObject: Remove non-std::chrono SummonCreature overload
Remove
TempSummon* SummonCreature(uint32 entry, Position const& pos, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0, uint32 vehId = 0, uint32 spellId = 0);

(cherry picked from commit a41f599be72ccc88b13c1cf725f20cee4a5335d7)
2022-01-24 12:39:59 +01:00
Giacomo Pozzoni 21e9fac8bd Core/Metric: Add new cmake option WITH_DETAILED_METRICS to enable more metrics (#25136)
* Core/Metric: Add new cmake option WITH_DETAILED_METRICS to enable more metrics

Add more detailed metrics in World::UpdateSessions().

* Attempt using C++17 features

* Fix cmake typo

Co-authored-by: NoName <[email protected]>

* Fix build with WITHOUT_METRICS

* Update Performance profiling dashboard with Update sessions panel

* Add panel to show sessions with update time above 100 ms

* Move legends on the right and add max update time diff in the legend of sessions

Co-authored-by: NoName <[email protected]>
(cherry picked from commit 36ef487a90d0d14c4da8ce7e19b5916b8b15056c)
2022-01-24 12:21:36 +01:00
Carbenium 03e4c0d7bf Core/Creature: Remove non-std::chrono overload of DespawnOrUnsummon
(cherry picked from commit 480dee3125929181b7004810516ea673c61f5811)
2022-01-24 12:21:26 +01:00
Carbenium a7cbb16229 Core/EventProcessor: std::chrono-ify the remaining public API
(cherry picked from commit 1d8782e3566393f71fbc091de57c96a9a15972cb)
2022-01-24 12:06:56 +01:00
Carbenium eeffb310de Core/EventProcessor: std::chrono-ify CalculateTime
uint64 CalculateTime(uint64 t_offset) has been replaced with Milliseconds CalculateTime(Milliseconds t_offset).
Also add the std::chrono-ified overload void AddEvent(BasicEvent*, Milliseconds, bool)

(cherry picked from commit 92a02a5c8750913f596d7e3b58bf8439cb770c28)
2022-01-24 12:00:35 +01:00
Carbenium 310f996b1d Core/WorldObject: Partially std::chrono-ify SummonCreature overloads
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, uint32 despawnTime = 0);
to
TempSummon* SummonCreature(uint32 entry, float x, float y, float z, float o = 0, TempSummonType despawnType = TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime = 0s);

(cherry picked from commit 1131229ee9c43704b11187f0b11c327db92018b6)
2022-01-24 11:55:32 +01:00
Carbenium da17942af9 Core/EventMap: Clarify documentation of ScheduleEvent
(cherry picked from commit 7865c1c197f4eb9165ef3ab26eb4f750a5b58960)
2022-01-24 00:01:38 +01:00