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 43dec9e4d0)
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 5b7ead65bb)
Handle StringFormat() exceptions in case of malformed string format to avoid causing unhandled exception crashes
(cherry picked from commit c79811de4f)
Change the infinite loop fix in Detour to allow looping through all the m_nodePool nodes max once, otherwise it most likely means that we entered an infinite loop. This is currently set to 1024.
(cherry picked from commit 12e6faa0fa)
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 c8ec2dd95d)
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 f04e90f638)
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 518e6299ca
(cherry picked from commit 46c7446bd4)
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 71dde16ce9)
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 fd69c133b1)
Allow to specify different Recast settings for different maps, currently handled in GetMapSpecificConfig() as a switch statement.
Set walkableRadius to 0 in Blade's Edge Arena (Map ID 562) so the pets can walk on the thin rope between the bridge and the pillar.
(cherry picked from commit e4658a1307)