diff options
author | Treeston <treeston.mmoc@gmail.com> | 2018-08-29 19:53:23 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-10-23 16:01:05 +0200 |
commit | 55cb4f9a6d614943ffe70b7e17ca74aeeafe3a18 (patch) | |
tree | e50dfb4a6c56570c7ea4a31beb324d36928721f0 /src | |
parent | 19f24b3e40c5dd56939824a50846fcb437f4a8cd (diff) |
Core/Threat: Fear no longer suppresses threat. All confuse effects now suppress threat, even ones that wouldn't break on damage.
(cherry picked from commit 704870496f672f628635e45a1cec98a485d86c28)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Combat/ThreatManager.cpp | 4 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 16 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index 867a34c4c44..12253e9b588 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -106,7 +106,9 @@ bool ThreatReference::ShouldBeSuppressed() const { if (_victim->IsImmunedToDamage(_owner->GetMeleeDamageSchoolMask())) return true; - if (_victim->HasBreakableByDamageCrowdControlAura()) + if (_victim->HasAuraType(SPELL_AURA_MOD_CONFUSE)) + return true; + if (_victim->HasBreakableByDamageAuraType(SPELL_AURA_MOD_STUN)) return true; return false; } diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 2b952d88cb1..7b138f84562 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2042,8 +2042,6 @@ void AuraEffect::HandleAuraTransform(AuraApplication const* aurApp, uint8 mode, } } } - - target->GetThreatManager().EvaluateSuppressed(); } void AuraEffect::HandleAuraModScale(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -2798,7 +2796,8 @@ void AuraEffect::HandleModConfuse(AuraApplication const* aurApp, uint8 mode, boo Unit* target = aurApp->GetTarget(); target->SetControlled(apply, UNIT_STATE_CONFUSED); - target->GetThreatManager().EvaluateSuppressed(); + if (apply) + target->GetThreatManager().EvaluateSuppressed(); } void AuraEffect::HandleModFear(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -2809,7 +2808,6 @@ void AuraEffect::HandleModFear(AuraApplication const* aurApp, uint8 mode, bool a Unit* target = aurApp->GetTarget(); target->SetControlled(apply, UNIT_STATE_FLEEING); - target->GetThreatManager().EvaluateSuppressed(); } void AuraEffect::HandleAuraModStun(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -2820,7 +2818,8 @@ void AuraEffect::HandleAuraModStun(AuraApplication const* aurApp, uint8 mode, bo Unit* target = aurApp->GetTarget(); target->SetControlled(apply, UNIT_STATE_STUNNED); - target->GetThreatManager().EvaluateSuppressed(); + if (apply) + target->GetThreatManager().EvaluateSuppressed(); } void AuraEffect::HandleAuraModRoot(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -2831,7 +2830,6 @@ void AuraEffect::HandleAuraModRoot(AuraApplication const* aurApp, uint8 mode, bo Unit* target = aurApp->GetTarget(); target->SetControlled(apply, UNIT_STATE_ROOT); - target->GetThreatManager().EvaluateSuppressed(); } void AuraEffect::HandlePreventFleeing(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -3203,7 +3201,8 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const* aurApp, uint target->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::StealthOrInvis); } - target->GetThreatManager().EvaluateSuppressed(); + if (apply) + target->GetThreatManager().EvaluateSuppressed(); } void AuraEffect::HandleAuraModDmgImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -3214,7 +3213,8 @@ void AuraEffect::HandleAuraModDmgImmunity(AuraApplication const* aurApp, uint8 m Unit* target = aurApp->GetTarget(); m_spellInfo->ApplyAllSpellImmunitiesTo(target, GetSpellEffectInfo(), apply); - target->GetThreatManager().EvaluateSuppressed(); + if (apply) + target->GetThreatManager().EvaluateSuppressed(); } void AuraEffect::HandleAuraModDispelImmunity(AuraApplication const* aurApp, uint8 mode, bool apply) const |