* Return CheckCast result from CastSpell
* Return cast result from UnitAI methods too.
(cherry picked from commit 49d0a5bbb69dd352bac0009625ded2c472b66805)
* Core/Quest: improve source item deletion logic for items that give quests.
Prevent deletion of items that aren't supposed to be destroyed (like Demon Scarred Cloak).
* Whoops.
(cherry picked from commit 49dc8a8e4461063b4500e6b8af4eefadbd6698a1)
Change the way #22332 moved spell damage calculations from SpellEffectDMG to scripts, using OnEffectLaunchTarget and SetEffectValue instead
(cherry picked from commit 20772dbf5d10c6ec2891a068fb556c9f5fc7d324)
Change assert added in 43dec9e4d0b6f7da3c2051624742e9fb8a9bcb31 to error log since charmed creatures lose their AI until next map update
(cherry picked from commit 70fcdc687d1227a796c03f6353fc8dbfc4f4aea3)
(cherry picked from commit f45ebe71b0d8f6e3008514324a58a92c0db3810e)
The code in Creature::Update() should be modified to wait a few seconds before resetting the hp. PATHFIND_NOPATH / PATHFIND_INCOMPLETE don't really mean that the Creature can't attack the player anyway either.
(cherry picked from commit d910ffd77949f422bd08f12079866962fb53c4dc)
Rename recent GameObject spell overloads (they used to accept only Unit as parameters) to fix GCC warnings about partial function override.
(cherry picked from commit e3a9a9bfb2cba3fc1f6ed616b07fb0ea88de461f)
Add ".debug asan memoryleak" and ".debug asan outofbounds" commands to trigger Address Sanitizer warnings at runtime (or other dynamic analysis tools)
(cherry picked from commit 71d15ea25be3e86646faaa3266617a0b8177972f)
Fix a memory leak in Metric happening only when enabling/disabling Metric from configs at runtime, leaking the metric added between last SendBatch() call and the ScheduleSend() call in the same function. The only way to reproduce this is to actually freeze the thread calling SendBatch(), disable metric, reload config, unfreeze the thread.
(cherry picked from commit 0d1ff7446dce7b0641f49ac55a008669838612cd)
Fix infinite loop in npc_air_force_bots happening when aura 38067 was removed, triggering MoveInLineOfSight() that would add back the aura. Only 1 aura add/remove for guard for player is allowed now.
(cherry picked from commit 844e7ee9262a5ba035ac9e8a6ffc298fb97fd3a9)
Fix .cheat god command still letting you die with Area Aura like Slime near Thaddius, broken since 777b287dff
(cherry picked from commit f26f716714fefa2af4c6e3eea263206682d45236)
Fix crash caused by WorldObject::setActive(false) called after WorldObject::DespawnOrUnsummon() happening because the WorldObject would be set as not active but then Map::RemoveFromActiveHelper() would not be called because of not being in world anymore.
Whenever setActive() gets desync'd with what Map actually contains a rare crash would happen since Map only reads a few values of the active WorldObject, making it hard to reproduce. If this happens again some ASSERT calls should be added (or a check in Map::RemoveFromMap() could be added about if the WorldObject is in Map::m_activeNonPlayers container).
(cherry picked from commit 1c833f28e471e3787f1d328e44af5f065ad9ca8c)