Core/Unit: Do not remove auras from Pets and Guardians after evading
This commit is contained in:
1 parent
28a7ce2007
commit
6e68a60e6d
4 files changed
+13
-4
No files matched your search
@@ -259,9 +259,7 @@ bool CreatureAI::_EnterEvadeMode(EvadeReason /*why*/)
|
||||
if (!me->IsAlive())
|
||||
return false;
|
||||
|
||||
// don't remove vehicle auras, passengers aren't supposed to drop off the vehicle
|
||||
// don't remove clone caster on evade (to be verified)
|
||||
me->RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE, SPELL_AURA_CLONE_CASTER);
|
||||
me->RemoveAurasOnEvade();
|
||||
|
||||
// sometimes bosses stuck in combat?
|
||||
me->DeleteThreatList();
|
||||
|
||||
@@ -413,7 +413,7 @@ void SmartAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||
if (!me->IsAlive() || me->IsInEvadeMode())
|
||||
return;
|
||||
|
||||
me->RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE, SPELL_AURA_CLONE_CASTER);
|
||||
me->RemoveAurasOnEvade();
|
||||
|
||||
me->AddUnitState(UNIT_STATE_EVADE);
|
||||
_EnterEvadeMode();
|
||||
|
||||
@@ -3960,6 +3960,16 @@ void Unit::RemoveArenaAuras()
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveAurasOnEvade()
|
||||
{
|
||||
if (IsCharmedOwnedByPlayerOrPlayer()) // if it is a player owned creature it should not remove the aura
|
||||
return;
|
||||
|
||||
// don't remove vehicle auras, passengers aren't supposed to drop off the vehicle
|
||||
// don't remove clone caster on evade (to be verified)
|
||||
RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE, SPELL_AURA_CLONE_CASTER);
|
||||
}
|
||||
|
||||
void Unit::RemoveAllAurasOnDeath()
|
||||
{
|
||||
// used just after dieing to remove all visible auras
|
||||
|
||||
@@ -1771,6 +1771,7 @@ class Unit : public WorldObject
|
||||
void RemoveAreaAurasDueToLeaveWorld();
|
||||
void RemoveAllAuras();
|
||||
void RemoveArenaAuras();
|
||||
void RemoveAurasOnEvade();
|
||||
void RemoveAllAurasOnDeath();
|
||||
void RemoveAllAurasRequiringDeadTarget();
|
||||
void RemoveAllAurasExceptType(AuraType type);
|
||||
|
||||
Reference in new issue
Block a user