mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 00:08:01 +00:00
quickfix: crashlog player::RestoreSpellMods
quickfix: crashlog player::RestoreSpellMods
This commit is contained in:
@@ -15971,6 +15971,11 @@ void Unit::CleanupBeforeRemoveFromMap(bool finalCleanup)
|
|||||||
if (IsInWorld()) // not in world and not being removed atm
|
if (IsInWorld()) // not in world and not being removed atm
|
||||||
RemoveFromWorld();
|
RemoveFromWorld();
|
||||||
|
|
||||||
|
// Added for mod_playerbots crash fixes; cancel and remove pending events before aura/spellmod cleanup.
|
||||||
|
// Without this SpellEvent may be cancelled later during EventProcessor destruction after auras/spellmods
|
||||||
|
// are already removed and leading to invalid access in Player::RestoreSpellMods on logout.
|
||||||
|
m_Events.KillAllEvents(false);
|
||||||
|
|
||||||
ASSERT(GetGUID());
|
ASSERT(GetGUID());
|
||||||
|
|
||||||
// A unit may be in removelist and not in world, but it is still in grid
|
// A unit may be in removelist and not in world, but it is still in grid
|
||||||
|
|||||||
Reference in New Issue
Block a user