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
@@ -920,7 +920,6 @@ void Battleground::RemovePlayerAtLeave(const uint64& guid, bool Transport, bool
// if arena, remove the specific arena auras // if arena, remove the specific arena auras
if (isArena()) if (isArena())
{ {
plr->RemoveArenaAuras(true); // removes debuffs / dots etc., we don't want the player to die after porting out
bgTypeId=BATTLEGROUND_AA; // set the bg type to all arenas (it will be used for queue refreshing) bgTypeId=BATTLEGROUND_AA; // set the bg type to all arenas (it will be used for queue refreshing)
// unsummon current and summon old pet if there was one and there isn't a current pet // unsummon current and summon old pet if there was one and there isn't a current pet
+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 // in join, remove positive buffs, on end, remove negative
// used to remove positive visible auras in arenas // used to remove positive visible auras in arenas
@@ -4039,8 +4039,7 @@ void Unit::RemoveArenaAuras(bool onleave)
Aura const* aura = aurApp->GetBase(); Aura const* aura = aurApp->GetBase();
if (!(aura->GetSpellProto()->AttributesEx4 & SPELL_ATTR4_UNK21) // don't remove stances, shadowform, pally/hunter auras if (!(aura->GetSpellProto()->AttributesEx4 & SPELL_ATTR4_UNK21) // don't remove stances, shadowform, pally/hunter auras
&& !aura->IsPassive() // don't remove passive auras && !aura->IsPassive() // don't remove passive auras
&& !(aura->GetSpellProto()->AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT) // not death persistent auras && (aurApp->IsPositive() || !(aura->GetSpellProto()->AttributesEx3 & SPELL_ATTR3_DEATH_PERSISTENT))) // not negative death persistent auras
&& (aurApp->IsPositive() ^ onleave)) // remove positive buffs on enter, negative buffs on leave
RemoveAura(iter); RemoveAura(iter);
else else
++iter; ++iter;
+1 -1
View File
@@ -1663,7 +1663,7 @@ class Unit : public WorldObject
void RemoveAreaAurasDueToLeaveWorld(); void RemoveAreaAurasDueToLeaveWorld();
void RemoveAllAuras(); void RemoveAllAuras();
void RemoveArenaAuras(bool onleave = false); void RemoveArenaAuras();
void RemoveAllAurasOnDeath(); void RemoveAllAurasOnDeath();
void RemoveAllAurasRequiringDeadTarget(); void RemoveAllAurasRequiringDeadTarget();
void RemoveAllAurasExceptType(AuraType type); void RemoveAllAurasExceptType(AuraType type);