aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorthenecromancer <none@none>2010-01-23 15:05:33 +0100
committerthenecromancer <none@none>2010-01-23 15:05:33 +0100
commit39ba392c7538db1bd18e617185c28420780e237c (patch)
treea620cd4b809816f697697af9478d6e538eb7cc5d /src/game/Unit.cpp
parent76102c1cdd0fc8bb473f9b3fd3965cea5a3794f6 (diff)
parentd9cb0702158fd045285f2c0a904cb31a45a3864a (diff)
Merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index fdf54cb018a..1204c508695 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3885,6 +3885,7 @@ void Unit::RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode)
++m_auraUpdateIterator;
m_ownedAuras.erase(i);
+ m_removedAuras.push_back(aura);
// Unregister single target aura
if (aura->IsSingleTarget())
@@ -12960,7 +12961,7 @@ void Unit::RemoveFromWorld()
}
}
-void Unit::CleanupsBeforeDelete()
+void Unit::CleanupsBeforeDelete(bool finalCleanup)
{
if (IsInWorld())
RemoveFromWorld();
@@ -12970,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();