Core/Threat: Fear no longer suppresses threat. All confuse effects now suppress threat, even ones that wouldn't break on damage.

Port From (https://github.com/TrinityCore/TrinityCore/commit/55cb4f9a6d614943ffe70b7e17ca74aeeafe3a18)
This commit is contained in:
hondacrx
2021-11-02 14:29:49 -04:00
parent 7a6670c61c
commit 3335ae937d
3 changed files with 16 additions and 10 deletions
+5 -1
View File
@@ -891,7 +891,11 @@ namespace Game.Combat
{
if (_victim.IsImmunedToDamage(_owner.GetMeleeDamageSchoolMask()))
return true;
if (_victim.HasBreakableByDamageCrowdControlAura())
if (_victim.HasAuraType(AuraType.ModConfuse))
return true;
if (_victim.HasBreakableByDamageAuraType(AuraType.ModStun))
return true;
return false;
+1 -1
View File
@@ -1076,7 +1076,7 @@ namespace Game.Entities
return false;
}
bool HasBreakableByDamageAuraType(AuraType type, uint excludeAura)
public bool HasBreakableByDamageAuraType(AuraType type, uint excludeAura = 0)
{
var auras = GetAuraEffectsByType(type);
foreach (var eff in auras)
+6 -4
View File
@@ -1580,8 +1580,6 @@ namespace Game.Spells
}
}
}
target.GetThreatManager().EvaluateSuppressed();
}
[AuraEffectHandler(AuraType.ModScale)]
@@ -2381,6 +2379,8 @@ namespace Game.Spells
Unit target = aurApp.GetTarget();
target.SetControlled(apply, UnitState.Confused);
if (apply)
target.GetThreatManager().EvaluateSuppressed();
}
@@ -2393,7 +2393,6 @@ namespace Game.Spells
Unit target = aurApp.GetTarget();
target.SetControlled(apply, UnitState.Fleeing);
target.GetThreatManager().EvaluateSuppressed();
}
[AuraEffectHandler(AuraType.ModStun)]
@@ -2405,6 +2404,8 @@ namespace Game.Spells
Unit target = aurApp.GetTarget();
target.SetControlled(apply, UnitState.Stunned);
if (apply)
target.GetThreatManager().EvaluateSuppressed();
}
@@ -2418,7 +2419,6 @@ namespace Game.Spells
Unit target = aurApp.GetTarget();
target.SetControlled(apply, UnitState.Root);
target.GetThreatManager().EvaluateSuppressed();
}
[AuraEffectHandler(AuraType.PreventsFleeing)]
@@ -2815,6 +2815,7 @@ namespace Game.Spells
target.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.StealthOrInvis);
}
if (apply)
target.GetThreatManager().EvaluateSuppressed();
}
@@ -2827,6 +2828,7 @@ namespace Game.Spells
Unit target = aurApp.GetTarget();
m_spellInfo.ApplyAllSpellImmunitiesTo(target, GetSpellEffectInfo(), apply);
if (apply)
target.GetThreatManager().EvaluateSuppressed();
}