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
@@ -155,7 +155,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
return;
case Jaraxxus.EventFelLightning:
{
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 0.0f, true, -Jaraxxus.SpellLordHittin);
Unit target = SelectTarget(SelectAggroTarget.Random, 0, 0.0f, true, true, -Jaraxxus.SpellLordHittin);
if (target)
DoCast(target, Jaraxxus.SpellFelLighting);
_events.ScheduleEvent(Jaraxxus.EventFelLightning, RandomHelper.URand(10 * Time.InMilliseconds, 15 * Time.InMilliseconds));
@@ -163,7 +163,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
}
case Jaraxxus.EventIncinerateFlesh:
{
Unit target = SelectTarget(SelectAggroTarget.Random, 1, 0.0f, true, -Jaraxxus.SpellLordHittin);
Unit target = SelectTarget(SelectAggroTarget.Random, 1, 0.0f, true, true, -Jaraxxus.SpellLordHittin);
if (target)
{
Talk(Jaraxxus.EmoteIncinerate, target);
@@ -179,7 +179,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
return;
case Jaraxxus.EventLegionFlame:
{
Unit target = SelectTarget(SelectAggroTarget.Random, 1, 0.0f, true, -Jaraxxus.SpellLordHittin);
Unit target = SelectTarget(SelectAggroTarget.Random, 1, 0.0f, true, true, -Jaraxxus.SpellLordHittin);
if (target)
{
Talk(Jaraxxus.EmoteLegionFlame, target);
@@ -1174,8 +1174,7 @@ namespace Scripts.Northrend.CrusadersColiseum.TrialOfTheCrusader
{
//1-shot Fizzlebang
temp.CastSpell(me, 67888, false);
me.SetInCombatWith(temp);
temp.AddThreat(me, 1000.0f);
AddThreat(me, 1000.0f, temp);
temp.GetAI().AttackStart(me);
}
_instance.SetData(DataTypes.Event, 1160);