Commit Graph
18108 Commits
Author SHA1 Message Date
Shauren 7a413ae543 Core/Spells: Fixed spells using MovePositionToFirstCollision for selecting target position getting Z coord offset by caster or target collision height (depending on spell target type)
(cherry picked from commit d63d15c505708d175c52d87afc76cbe4ac59497b)
2021-11-23 23:16:49 +01:00
Keader dba7e2507f Scripts/Illidan: Fixed Parasitic shadowfiends reproducing like rabbits
(cherry picked from commit a617cc40977b7b019f79a198daebede90c59f5c1)
2021-11-23 23:16:43 +01:00
jackpoz ef04a26bf4 Core/Pet: Add assert
Add additional assert to check if it's possible for a Pet not to have an active AI when the Player owner kills an enemy.
Ref #23036

(cherry picked from commit 43dec9e4d0b6f7da3c2051624742e9fb8a9bcb31)
2021-11-23 23:10:45 +01:00
Heaven31415 0ea3fe545c Refactor SendSysMessage, SendGlobalSysMessage, SendGlobalGMSysMessage (#23029)
(cherry picked from commit 9db50f05cb7d225f3bd7b2a209509a072f915fd3)
2021-11-23 23:07:23 +01:00
Sorikoff ee0662ca3d Scripts/Scarlet Enclave: Stable Master Kitrik's spell Repo (#23023)
(cherry picked from commit f0f4d0280daf81a841c30332f608f7acdfb1f374)
2021-11-23 23:04:34 +01:00
Shauren c14cf5a892 Core/Misc: Added lambda support to EventProcessor
Closes #22909

(cherry picked from commit 813f693768ee94864b0d24423b9265bde2c9903d)
2021-11-23 23:01:47 +01:00
Giacomo Pozzoni ed5ba915f1 Core/Scripts: Change PlayerScript and CreatureScript inheritance (#23048)
Remove UnitScript from PlayerScript and CreatureScript classes as that's how the original system that was PR'd worked, see https://github.com/TrinityCore/TrinityCore/pull/7867 for reference.
Please note these are used as global hooks and should really just invoke stateless functions.
If you need to hook methods from PlayerScript/CreatureScript and UnitScript, just define 2 different scripts (this is how the original system worked and how it was designed to work)

(cherry picked from commit 5b7ead65bb116195f4336934bcff830e1b2af5bb)
2021-11-23 22:54:24 +01:00
TheWinchesters 47adf2e4c8 [3.3.5] Commands: lookup player shows which character is online (#23039)
* Show 'online' for every online player in lookup player commands

(cherry picked from commit a0056951f7e425341760ebf3a7770477ef7f4446)
2021-11-23 22:52:53 +01:00
Giacomo Pozzoni 31dca39c05 3.3.5 threat assert (#23034)
* Core/Creature: Change assert about Threat to log

(cherry picked from commit cb8ff7976b1419c6a1334bb49783480d543aff16)
2021-11-23 22:48:39 +01:00
Aokromes 2682bf0fca Core/Misc: Add categories to 3 logs
(cherry picked from commit 2d22c027fe0df505ddc63d4faaad032cddd5e258)
2021-11-23 22:29:21 +01:00
Aokromes f5827770fc Core/Spells: Add categories to 2 logs
(cherry picked from commit 1cba3633606291823dc0184ac4bca8fced8fefcd)
2021-11-23 22:29:01 +01:00
Aokromes c5720e37c1 Core/Entities: Add categories to 2 logs
Closes #22922

(cherry picked from commit 578c796625859656b788565378250f783a348b09)
2021-11-23 22:28:38 +01:00
jackpoz 23489568db Core/MMaps: Fix infinite loop in Detour
Fix an infinite loop in Detour happening in Dalaran Sewers.
This is more of an emergency patch until we figure out why dtNodes have a circular reference (A -> B -> C -> A) happening quite often in this place

(cherry picked from commit c8ec2dd95d07e3eec00027cdb9605529a49d6475)
2021-11-23 22:28:28 +01:00
jackpoz 3ddbf02dc7 Core/Misc: Fix issues reported by static analysis
Fix issues reported by Coverity Scan

(cherry picked from commit 2fda1572d214d0b114e0291106363f49c2d3179e)
2021-11-23 22:20:39 +01:00
jackpoz 9807f32334 Core/Misc: Fix issues reported by dynamic analysis
Closes #23021

(cherry picked from commit 9942047c721110b4d2135028ec4c17060e0301bc)
2021-11-23 22:19:06 +01:00
jackpoz 927e62e88e Core/Group: Fix memory leak
Fix memory leak happening when disbanding a group with an ongoing roll.
Please note this is not blizz-like but at least we don't leak memory anymore.

(cherry picked from commit f04e90f638425c0e0ef2e40f0cd29ab7eec625d1)
2021-11-23 21:28:23 +01:00
Sorikoff fc9106054b Scripts/Scarlet Enclave: Grand Theft Palomino (#22967)
* Grand Theft Palomino

* Cosmetic issues

* Address CR

(cherry picked from commit d5f565f42992d5142b30c7fbd694f8a5b1245f4c)
2021-11-23 21:28:03 +01:00
Chaouki Dhib 4507a02ada Core/Movement: Implement move time skipped handler (#22994)
* Implement CMSG_MOVE_TIME_SKIPPED handler and move it to MovementHandler.cpp

* Add better error handling

* Update MovementHandler.cpp

(cherry picked from commit f9ed72e351ecdafe77da2036d9fd68e46da2f3ab)
2021-11-23 21:18:07 +01:00
jackpoz e475cac631 Core/Spells: Fix assert triggered
Fix assert triggered when a spell would trigger another spell in OnEffectHitTarget that would kill the aura owner, then processing the main spell effects. The triggered spell can kill the aura owner, changing its death state to CORPSE and removing auras created.

Fix #21856
Ref 518e6299ca08a362bc3709daaaa5e5d5633d1bf1

(cherry picked from commit 46c7446bd4ef606b1091c1582df50e027fab28b6)
2021-11-23 20:47:31 +01:00
Sorikoff 31f4bb1436 DB/Quest: Sniff Out the Enemy
Closes #23006

(cherry picked from commit 806dd940cec8352cc3a619b9cab39c95d7b86e59)
2021-11-23 20:46:27 +01:00
Keader 084491669e Scripts/Magister Terrace: Fixed a enum mistake
(cherry picked from commit 33b0654f8eb7aedf2a5a7d6b88f222ce31d20331)
2021-11-23 00:40:07 +01:00
Keader cfd0e18b81 Core/Misc: Fixed shaman elementals and magister terrace first boss access
(cherry picked from commit 6545cd33b91468de7c1b4beb77cdeb4ecb77f501)
2021-11-23 00:39:59 +01:00
Keader 4a943fd3d2 Scripts/Utgarde Keep: Fix Ingvar Evading (again)
UNIT_FLAG_NON_ATTACKABLE makes ingvar become a invalid target and lose threatlist, so me->IsThreatened() will return false.
We dont need it at all, since UpdateAI will handle evade already.

(cherry picked from commit 71dde16ce9a9c7904a2902ae288b3f05851224ac)
2021-11-23 00:39:17 +01:00
Keader 5c48cac6f9 Scripts/Temple of Ahn Qiraj: Scripted doors of AQ40
Doors added in https://github.com/TrinityCore/TrinityCore/commit/1ba09572b5a49d5cd247cdca47109d3325ec12f3

(cherry picked from commit 06078e30c6f1d6e2ab1dcecbba15127b07b32bb7)
2021-11-23 00:39:17 +01:00
Ovah 3027458338 Scripts/Magister Terrace: Update InstanceScript and more fixes
Cherrypicked of https://github.com/Ovahlord/TrinityCore/commits/4.3.4

(cherry picked from commit 1b346485e40ddee958c116579d93bcff063021a5)
2021-11-23 00:39:13 +01:00
Ovah 3847d7b277 Scripts/Magister Terrace: Felblood Kaelthas rewrite
Cherrypick of https://github.com/Ovahlord/TrinityCore/commit/ae440400aaf90de11cf92010839ab98a8403c003

(cherry picked from commit 00958c9178781ac11a9dcabd034ed2e82120fad6)
2021-11-23 00:21:42 +01:00
Keader 4af2894626 Scripts/Black Temple: Mother Shahraz fatal attraction need be random
Higher distance showed in my sniffs is 48 yards (rounding 50 yards). If someone find more then that, please let me know.
Ty killerwife

(cherry picked from commit fd69c133b10e289167f34438cb34fb5d4a141b4c)
2021-11-22 23:57:54 +01:00
Keader c3210798f0 Scripts/Black Temple: Fixed some issues in Illidari Council
Ty killerwife for all help :)

(cherry picked from commit ef6240312ceb08f253a492db88eebd182925211f)
2021-11-22 23:57:19 +01:00
Shauren 7b11d17f49 Core/Players: Load faction change items from db2 instead of db 2021-11-22 23:54:14 +01:00
Shauren 630adfec22 Core/Phasing: Fixed inverse phaseshift logic 2021-11-22 22:39:16 +01:00
jackpoz 3acb420444 Core/MapScripts: Allow GameObjects to be caster of SCRIPT_COMMAND_CAST_SPELL
(cherry picked from commit 813cf761fcf8737e50486672be28900c9cf4f36f)
2021-11-21 21:10:10 +01:00
jackpoz 36468203dd Core/Spells: Fix assert triggered
Fix assert triggered when a spell would trigger another spell in OnEffectHitTarget that would kill the target, then processing the main spell effects. The triggered spell can kill the target, changing its death state to CORPSE and removing auras created.
Fix #22306

(cherry picked from commit 518e6299ca08a362bc3709daaaa5e5d5633d1bf1)
2021-11-21 21:09:36 +01:00
jackpoz d532420d79 Core/Misc: Update 85e3169fbd7b2da70e0f054399f4db64ded36325 about SOAP
Change again how SOAP is stopped if SOAP successfully binds but worldserver fails to bind its sockets.
A crash remains if SOAP fails to bind because it calls exit() and that triggers asserts everywhere.

(cherry picked from commit d05ab073cb102a4f868b0fda51ef4368350ded32)
2021-11-21 20:16:46 +01:00
jackpoz f83601de2f Core/Networking: Set SO_REUSEADDR on *nix platforms
(cherry picked from commit 46f2595f511011d577be0ecee3d9f44c980ddc92)
2021-11-21 20:16:26 +01:00
jackpoz 05210c2a34 Core/Misc: Fix shutdown with SOAP enabled
Fix worldserver entering a loop when having SOAP enabled but failing to bind both SOAP and worldserver listened socket. SOAP thread would keep trying to bind the socket over and over checking World::IsStopped() condition that was never set to true

(cherry picked from commit 85e3169fbd7b2da70e0f054399f4db64ded36325)
2021-11-21 20:16:03 +01:00
Shauren c28ffca616 Core/Misc: Port style changes from d8819147b023f318c0ca2c42da4d05e4f9551cce 2021-11-21 20:15:35 +01:00
ccrs 2218297037 Scripts/ICC: npc_suppresser corrections
closes #22908

(cherry picked from commit c5423fa474273400982b277c82bb38385b2798e1)
2021-11-21 20:02:01 +01:00
Shauren f2688f3abe Remove whitespace (63ea6a50e851f9df82381e254a7c56e1c575cfe2) 2021-11-21 20:01:49 +01:00
Shauren dcd69240b6 Core/Commands: Fixed creature/gameobject move commands not updating which cell they belong to
Closes #22720

(cherry picked from commit ec1cfa36f4c286ad8037516460a4e99ea5d7a5ed)
2021-11-21 19:52:26 +01:00
Giacomo Pozzoni b1b5a6a591 Core/Quest: Fix crash in GetQuestDialogStatus()
Fix possible NULL dereference in GetQuestDialogStatus()
Fixes #22516

(cherry picked from commit 6859dfa2d157f0d174004a00a9d047d6eb38f9a1)
2021-11-21 19:51:52 +01:00
Killyana f497534b15 DB/Creature: Update Lord Victor Nefarius gossips with the correct entry
Closes #22946
2021-11-21 19:45:48 +01:00
ccrs a8ec1ba9bc Core/Unit: rename & cleanup GetCreatePowers
it hurted my eyes too much

(cherry picked from commit 954fd2639a5745c8f5165f329f64a143c6ffc5f7)
2021-11-21 19:28:17 +01:00
Shauren de8e1a4820 Core/Units: Fixed crash with charm/possess
Closes #27168
Closes #27247
2021-11-21 18:49:55 +01:00
Giacomo Pozzoni ed88435494 3.3.5 UnitAI (#22911)
* Core/AI: Revamp how UnitAI changes are applied

Revamp how UnitAI changes are applied by storing current AI in a variable and all previous AIs plus current in a stack.
The callers can push/pop AIs on the stack that will take effect only in next Unit::Update() call.
The current AI will be a valid object for the whole duration of Unit::Update() and until next Unit::Update() call.

* Core/AI: Apply new AI change code

* Core/AI: Fix build

* Core/AI: Fix crash on Creature::AIM_Create()

* Core/AI: Fix crash

* Core/AI: Restore ASSERT

* Core/AI: Fix UnitAI not being popped properly when restoring a charmed AI

(cherry picked from commit 8f9654d8176646c3076482477fc4b91011fb83cc)
2021-11-21 15:36:57 +01:00
Trond B. Krokli 159e6521cc Scripts/Borean Tundra: Corastrasza gossip menu improvements (#22942)
- split the quest status check, the quest gossips are different
- remove old hardcoded text (deprecated method)
- enumerate already existing DB gossip menu option items

(cherry picked from commit a8558c4361a7e3560c094886ef3072d46c64de44)
2021-11-21 15:27:39 +01:00
Shauren a9018d1609 Core/CLI: Fixed utf-8 console input on windows
(cherry picked from commit 901af6546bed3e707b81c272774c414baaf8dd50)
2021-11-21 15:03:48 +01:00
Killyana d8b76a6e6d DB/Creature: Wrath Corruptor
Thanks to Keader for the spell_script
Original sql by Tobschinski https://github.com/cmangos/tbc-db/commit/c8f1753834ba3dba4c6263346afe29cd363c2431

(cherry picked from commit fb28083b3b2966952b1227f6585b48fcc70dbe7a)
2021-11-21 14:38:17 +01:00
Shauren c2eff8fabc Core/LFG: Ignore LFG cooldown when joining queue to replace missing party member when dungeon is already in progress
(cherry picked from commit 7fb52334b2fea4bdd3a83c6af4dbcc39cacb41a9)
2021-11-21 14:35:00 +01:00
Trond B. Krokli e26b667742 Scripts/Quest: make Wounded Skirmisher reply talk show class & race (#22936)
Quest 12288: Overwhelmed!
- Upon casting the healing quest spell, Wounded Skirmisher (npc_wounded_skirmisher)
  shows $r and $c in their reply talk text because of the missing target argument,
  hence not targeting the player on the quest (or the specific caster, in this case).

Text used by the NPC Wounded Skirmisher:
    0  Ahh.... better.
    1  Whoa - I nearly died there. Thank you, $r!
    2  Thank you, $c.

Solution: add the missing target name, caster, to the Talk() script line.
(cherry picked from commit 95398fadf958d40ba6755a6c2f7b374f0a36b7c7)
2021-11-21 14:34:43 +01:00
ccrs e52be384d3 Core/Movement: 9080e7863c2 followup
not the desired optimization I was aiming at, ty Shauren

(cherry picked from commit 9695c3d46d752d23817da9255b1c02f79faceabd)
2021-11-21 14:17:56 +01:00