Core/Arenas: Remove both positive and negative auras only at arena join
Closes #2000
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user