aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2010-01-22 20:03:47 +0100
committerQAston <none@none>2010-01-22 20:03:47 +0100
commit216d32e8a76b65fb8d661d7e5a200edd637b8dd9 (patch)
treed73c6c8f58b1ec74fa248182f1e04b45f3e7626f /src/game/Unit.cpp
parent7b3691ac9e5856736765dded523ca0ed18fc8db9 (diff)
*Prevent assertion fail in Unit::_AddAura after creature add to remove list.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp7
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();