mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #16503 from Rushor/evading
[3.3.5][6.x]Core/Unit: Do not remove auras from Pets and Guardians after evading
This commit is contained in:
@@ -257,9 +257,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);
|
||||
me->DeleteThreatList();
|
||||
|
||||
@@ -4185,6 +4185,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
|
||||
|
||||
@@ -1755,6 +1755,7 @@ class TC_GAME_API 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