*Prevent assertion fail in Unit::_AddAura after creature add to remove list.

--HG--
branch : trunk
This commit is contained in:
QAston committed 2010-01-22 20:03:47 +01:00
1 parent 7b3691ac9e
commit 216d32e8a7
9 files changed
+14 -11

No files matched your search

+5 -2
View File
@@ -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();