Skip to content

Instantly share code, notes, and snippets.

@tobmaps
Created June 15, 2011 14:17
Show Gist options
  • Save tobmaps/1027198 to your computer and use it in GitHub Desktop.
Save tobmaps/1027198 to your computer and use it in GitHub Desktop.
arena auras remove v1
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index ab38a53..faf0871 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -4039,8 +4039,8 @@ 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() && !onleave) || (!aurApp->IsPositive() // remove positive/negative buffs on enter, negative buffs on leave
+ && !aura->GetSpellProto()->AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT))) // not death persistent auras
RemoveAura(iter);
else
++iter;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment