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
@@ -587,7 +587,7 @@ namespace Scripts.Northrend.IcecrownCitadel
if (!me.IsAlive() || !me.IsInCombat())
return;
me.DeleteThreatList();
me.GetThreatManager().ClearAllThreat();
me.CombatStop(true);
me.GetMotionMaster().MoveTargetedHome();
}
@@ -733,11 +733,10 @@ namespace Scripts.Northrend.IcecrownCitadel
foreach (var stalker in creatures)
{
stalker.RemoveAllAuras();
stalker.DeleteThreatList();
stalker.GetThreatManager().ClearAllThreat();
stalker.CombatStop(true);
}
uint explosionSpell = isVictory ? GunshipSpells.ExplosionVictory : GunshipSpells.ExplosionWipe;
creatures.Clear();
me.GetCreatureListWithEntryInGrid(creatures, CreatureIds.GunshipHull, 200.0f);
@@ -872,7 +871,7 @@ namespace Scripts.Northrend.IcecrownCitadel
if (!me.IsAlive())
return;
me.DeleteThreatList();
me.GetThreatManager().ClearAllThreat();
me.CombatStop(true);
me.GetMotionMaster().MoveTargetedHome();
@@ -1132,7 +1131,7 @@ namespace Scripts.Northrend.IcecrownCitadel
if (!me.IsAlive())
return;
me.DeleteThreatList();
me.GetThreatManager().ClearAllThreat();
me.CombatStop(true);
me.GetMotionMaster().MoveTargetedHome();
@@ -1442,7 +1441,7 @@ namespace Scripts.Northrend.IcecrownCitadel
{
players.Sort(new ObjectDistanceOrderPred(me));
foreach (var pl in players)
me.AddThreat(pl, 1.0f);
AddThreat(pl, 1.0f);
AttackStart(players.First());
}