Core/SAI: Added SAI support for new areatriggers

Port From (https://github.com/TrinityCore/TrinityCore/commit/875fd4107f29c00f148ea77c6ff6d49f7ca92b76)
This commit is contained in:
hondacrx
2021-02-09 11:29:50 -05:00
parent 7c43718f1f
commit cf030b70b2
11 changed files with 156 additions and 32 deletions
+3 -3
View File
@@ -1540,7 +1540,7 @@ namespace Game.Entities
public override bool CanAlwaysSee(WorldObject obj)
{
if (IsAIEnabled && GetAI().CanSeeAlways(obj))
if (IsAIEnabled && GetAI<CreatureAI>().CanSeeAlways(obj))
return true;
return false;
@@ -3038,12 +3038,12 @@ namespace Game.Entities
public bool IsInEvadeMode() { return HasUnitState(UnitState.Evade); }
public bool IsEvadingAttacks() { return IsInEvadeMode() || CanNotReachTarget(); }
public new CreatureAI GetAI()
public override CreatureAI GetAI()
{
return (CreatureAI)i_AI;
}
public T GetAI<T>() where T : UnitAI
public T GetAI<T>() where T : CreatureAI
{
return (T)i_AI;
}