diff options
author | QAston <none@none> | 2010-01-24 13:23:34 +0100 |
---|---|---|
committer | QAston <none@none> | 2010-01-24 13:23:34 +0100 |
commit | 58383311a632337ab04900c5e035f43a6b4f7d1b (patch) | |
tree | dde0b88fec952d72dbb10465a3cdf1f971f5882e /src/game/Unit.cpp | |
parent | d1a40eb6888c325b3f01ac8a90f1dbac7ed56ea0 (diff) |
Fixes issue #476. Remove owned auras in addition to applied auras on unit death.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 316088d51bb..aa0e1dae0d1 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4369,7 +4369,16 @@ void Unit::RemoveAllAurasOnDeath() { Aura const * aura = iter->second->GetBase(); if (!aura->IsPassive() && !aura->IsDeathPersistent()) - RemoveAura(iter, AURA_REMOVE_BY_DEATH); + _UnapplyAura(iter, AURA_REMOVE_BY_DEATH); + else + ++iter; + } + + for (AuraMap::iterator iter = m_ownedAuras.begin(); iter != m_ownedAuras.end();) + { + Aura * aura = iter->second; + if (!aura->IsPassive() && !aura->IsDeathPersistent()) + RemoveOwnedAura(iter, AURA_REMOVE_BY_DEATH); else ++iter; } |