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:
@@ -891,7 +891,11 @@ namespace Game.Combat
|
|||||||
{
|
{
|
||||||
if (_victim.IsImmunedToDamage(_owner.GetMeleeDamageSchoolMask()))
|
if (_victim.IsImmunedToDamage(_owner.GetMeleeDamageSchoolMask()))
|
||||||
return true;
|
return true;
|
||||||
if (_victim.HasBreakableByDamageCrowdControlAura())
|
|
||||||
|
if (_victim.HasAuraType(AuraType.ModConfuse))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (_victim.HasBreakableByDamageAuraType(AuraType.ModStun))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1076,7 +1076,7 @@ namespace Game.Entities
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HasBreakableByDamageAuraType(AuraType type, uint excludeAura)
|
public bool HasBreakableByDamageAuraType(AuraType type, uint excludeAura = 0)
|
||||||
{
|
{
|
||||||
var auras = GetAuraEffectsByType(type);
|
var auras = GetAuraEffectsByType(type);
|
||||||
foreach (var eff in auras)
|
foreach (var eff in auras)
|
||||||
|
|||||||
@@ -1580,8 +1580,6 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
target.GetThreatManager().EvaluateSuppressed();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModScale)]
|
[AuraEffectHandler(AuraType.ModScale)]
|
||||||
@@ -2381,7 +2379,9 @@ namespace Game.Spells
|
|||||||
Unit target = aurApp.GetTarget();
|
Unit target = aurApp.GetTarget();
|
||||||
|
|
||||||
target.SetControlled(apply, UnitState.Confused);
|
target.SetControlled(apply, UnitState.Confused);
|
||||||
target.GetThreatManager().EvaluateSuppressed();
|
|
||||||
|
if (apply)
|
||||||
|
target.GetThreatManager().EvaluateSuppressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModFear)]
|
[AuraEffectHandler(AuraType.ModFear)]
|
||||||
@@ -2393,7 +2393,6 @@ namespace Game.Spells
|
|||||||
Unit target = aurApp.GetTarget();
|
Unit target = aurApp.GetTarget();
|
||||||
|
|
||||||
target.SetControlled(apply, UnitState.Fleeing);
|
target.SetControlled(apply, UnitState.Fleeing);
|
||||||
target.GetThreatManager().EvaluateSuppressed();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModStun)]
|
[AuraEffectHandler(AuraType.ModStun)]
|
||||||
@@ -2405,7 +2404,9 @@ namespace Game.Spells
|
|||||||
Unit target = aurApp.GetTarget();
|
Unit target = aurApp.GetTarget();
|
||||||
|
|
||||||
target.SetControlled(apply, UnitState.Stunned);
|
target.SetControlled(apply, UnitState.Stunned);
|
||||||
target.GetThreatManager().EvaluateSuppressed();
|
|
||||||
|
if (apply)
|
||||||
|
target.GetThreatManager().EvaluateSuppressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.ModRoot)]
|
[AuraEffectHandler(AuraType.ModRoot)]
|
||||||
@@ -2418,7 +2419,6 @@ namespace Game.Spells
|
|||||||
Unit target = aurApp.GetTarget();
|
Unit target = aurApp.GetTarget();
|
||||||
|
|
||||||
target.SetControlled(apply, UnitState.Root);
|
target.SetControlled(apply, UnitState.Root);
|
||||||
target.GetThreatManager().EvaluateSuppressed();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.PreventsFleeing)]
|
[AuraEffectHandler(AuraType.PreventsFleeing)]
|
||||||
@@ -2815,7 +2815,8 @@ namespace Game.Spells
|
|||||||
target.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.StealthOrInvis);
|
target.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.StealthOrInvis);
|
||||||
}
|
}
|
||||||
|
|
||||||
target.GetThreatManager().EvaluateSuppressed();
|
if (apply)
|
||||||
|
target.GetThreatManager().EvaluateSuppressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.DamageImmunity)]
|
[AuraEffectHandler(AuraType.DamageImmunity)]
|
||||||
@@ -2827,7 +2828,8 @@ namespace Game.Spells
|
|||||||
Unit target = aurApp.GetTarget();
|
Unit target = aurApp.GetTarget();
|
||||||
m_spellInfo.ApplyAllSpellImmunitiesTo(target, GetSpellEffectInfo(), apply);
|
m_spellInfo.ApplyAllSpellImmunitiesTo(target, GetSpellEffectInfo(), apply);
|
||||||
|
|
||||||
target.GetThreatManager().EvaluateSuppressed();
|
if (apply)
|
||||||
|
target.GetThreatManager().EvaluateSuppressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
[AuraEffectHandler(AuraType.DispelImmunity)]
|
[AuraEffectHandler(AuraType.DispelImmunity)]
|
||||||
|
|||||||
Reference in New Issue
Block a user