Core: Combat/threat system rewrite

Port From (https://github.com/TrinityCore/TrinityCore/commit/34c7810fe507eca1b8b9389630db5d5d26d92e77)
This commit is contained in:
hondacrx
2021-05-18 12:25:40 -04:00
parent 891c3b6478
commit 9851142796
37 changed files with 3454 additions and 3345 deletions
+4 -4
View File
@@ -188,12 +188,12 @@ namespace Game.AI
if (targetType == SelectAggroTarget.MaxDistance || targetType == SelectAggroTarget.MinDistance)
{
foreach (HostileReference refe in mgr.GetThreatList())
foreach (ThreatReference refe in mgr.GetSortedThreatList())
{
if (!refe.IsOnline())
continue;
targetList.Add(refe.GetTarget());
targetList.Add(refe.GetVictim());
}
}
else
@@ -202,12 +202,12 @@ namespace Game.AI
if (currentVictim != null)
targetList.Add(currentVictim);
foreach (HostileReference refe in mgr.GetThreatList())
foreach (ThreatReference refe in mgr.GetSortedThreatList())
{
if (!refe.IsOnline())
continue;
Unit thisTarget = refe.GetTarget();
Unit thisTarget = refe.GetVictim();
if (thisTarget != currentVictim)
targetList.Add(thisTarget);
}