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
+2 -12
View File
@@ -544,18 +544,8 @@ namespace Game.AI
//too far away and no free sight?
if (me.IsWithinDistInMap(who, SMART_MAX_AID_DIST) && me.IsWithinLOSInMap(who))
{
//already fighting someone?
if (me.GetVictim() == null)
{
AttackStart(who);
return true;
}
else
{
who.SetInCombatWith(me);
me.AddThreat(who, 0.0f);
return true;
}
me.EngageWithTarget(who);
return true;
}
return false;