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
+3 -5
View File
@@ -526,12 +526,10 @@ namespace Game.AI
float x, y, z;
me.GetPosition(out x, out y, out z);
var threatList = me.GetThreatManager().GetThreatList();
foreach (var refe in threatList)
foreach (var pair in me.GetCombatManager().GetPvECombatRefs())
{
Unit target = refe.GetTarget();
if (target)
if (target.IsTypeId(TypeId.Player) && !CheckBoundary(target))
Unit target = pair.Value.GetOther(me);
if (target.IsControlledByPlayer() && !CheckBoundary(target))
target.NearTeleportTo(x, y, z, 0);
}
}