mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-15 13:35:08 +00:00
Update Unit.cpp
This commit is contained in:
@@ -15971,9 +15971,9 @@ 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.
|
// 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
|
// Without this SpellEvent may be cancelled later during EventProcessor destruction after auras/spellmods
|
||||||
// are already gone leading to invalid access in Player::RestoreSpellMods on logout.
|
// are already removed and leading to invalid access in Player::RestoreSpellMods on logout.
|
||||||
m_Events.KillAllEvents(false);
|
m_Events.KillAllEvents(false);
|
||||||
|
|
||||||
ASSERT(GetGUID());
|
ASSERT(GetGUID());
|
||||||
|
|||||||
Reference in New Issue
Block a user