Core: Combat/threat system rewrite
Port From (https://github.com/TrinityCore/TrinityCore/commit/34c7810fe507eca1b8b9389630db5d5d26d92e77)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user