Fixes issue #476. Remove owned auras in addition to applied auras on unit death.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-01-24 13:23:34 +01:00
parent d1a40eb688
commit 58383311a6
+10 -1
View File
@@ -4369,7 +4369,16 @@ void Unit::RemoveAllAurasOnDeath()
{ {
Aura const * aura = iter->second->GetBase(); Aura const * aura = iter->second->GetBase();
if (!aura->IsPassive() && !aura->IsDeathPersistent()) 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 else
++iter; ++iter;
} }