Core/Arenas: Remove both positive and negative auras only at arena join

Closes #2000
This commit is contained in:
tobmaps
2011-06-16 00:20:20 +07:00
parent fb44a609ff
commit 2f2396b7e0
3 changed files with 3 additions and 5 deletions
+2 -3
View File
@@ -4029,7 +4029,7 @@ void Unit::RemoveAllAuras()
}
}
void Unit::RemoveArenaAuras(bool onleave)
void Unit::RemoveArenaAuras()
{
// in join, remove positive buffs, on end, remove negative
// used to remove positive visible auras in arenas
@@ -4039,8 +4039,7 @@ void Unit::RemoveArenaAuras(bool onleave)
Aura const* aura = aurApp->GetBase();
if (!(aura->GetSpellProto()->AttributesEx4 & SPELL_ATTR4_UNK21) // don't remove stances, shadowform, pally/hunter auras
&& !aura->IsPassive() // don't remove passive auras
&& !(aura->GetSpellProto()->AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT) // not death persistent auras
&& (aurApp->IsPositive() ^ onleave)) // remove positive buffs on enter, negative buffs on leave
&& (aurApp->IsPositive() || !(aura->GetSpellProto()->AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT))) // not negative death persistent auras
RemoveAura(iter);
else
++iter;