Skip to content

Commit

Permalink
Core/Threat: Fear no longer suppresses threat. All confuse effects no…
Browse files Browse the repository at this point in the history
…w suppress threat, even ones that wouldn't break on damage.

(cherry picked from commit 7048704)
  • Loading branch information
Treeston authored and Shauren committed Oct 23, 2021
1 parent 19f24b3 commit 55cb4f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/server/game/Combat/ThreatManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
16 changes: 8 additions & 8 deletions src/server/game/Spells/Auras/SpellAuraEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 55cb4f9

Please sign in to comment.