Combat/Threat rewrite - prep & refactor

Port From (https://github.com/TrinityCore/TrinityCore/commit/8be23fcbbdf26e8169defd761e61765f301bebe0)
This commit is contained in:
hondacrx
2020-08-22 11:58:19 -04:00
parent 67bacbb731
commit 193ad3a48d
42 changed files with 533 additions and 421 deletions
+3 -3
View File
@@ -1942,7 +1942,7 @@ namespace Game.Spells
return;
// Check for possible target
if (unitTarget == null || unitTarget.IsInCombat())
if (unitTarget == null || unitTarget.IsEngaged())
return;
// target must be OK to do this
@@ -2701,7 +2701,7 @@ namespace Game.Spells
if (!unitTarget.CanHaveThreatList())
return;
unitTarget.AddThreat(m_caster, damage);
unitTarget.GetThreatManager().AddThreat(m_caster, damage);
}
[SpellEffectHandler(SpellEffectName.HealMaxHealth)]
@@ -4408,7 +4408,7 @@ namespace Game.Spells
if (unitTarget == null)
return;
unitTarget.GetThreatManager().ModifyThreatPercent(m_caster, damage);
unitTarget.GetThreatManager().ModifyThreatByPercent(m_caster, damage);
}
[SpellEffectHandler(SpellEffectName.TransDoor)]