diff options
author | thenecromancer <none@none> | 2010-01-23 15:05:33 +0100 |
---|---|---|
committer | thenecromancer <none@none> | 2010-01-23 15:05:33 +0100 |
commit | 39ba392c7538db1bd18e617185c28420780e237c (patch) | |
tree | a620cd4b809816f697697af9478d6e538eb7cc5d /src/game/Unit.cpp | |
parent | 76102c1cdd0fc8bb473f9b3fd3965cea5a3794f6 (diff) | |
parent | d9cb0702158fd045285f2c0a904cb31a45a3864a (diff) |
Merge
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 8 |
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(); |