diff options
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 026ff352445..adb5dceb85c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12961,7 +12961,7 @@ void Unit::RemoveFromWorld() } } -void Unit::CleanupsBeforeDelete() +void Unit::CleanupsBeforeDelete(bool finalCleanup) { if (IsInWorld()) RemoveFromWorld(); @@ -12971,7 +12971,10 @@ void Unit::CleanupsBeforeDelete() //A unit may be in removelist and not in world, but it is still in grid //and may have some references during delete RemoveAllAuras(); - m_cleanupDone = true; + + if (finalCleanup) + m_cleanupDone = true; + InterruptNonMeleeSpells(true); m_Events.KillAllEvents(false); // non-delatable (currently casted spells) will not deleted now but it will deleted at call in Map::RemoveAllObjectsInRemoveList CombatStop(); |