Core/AI: AreaBoundary refactor
Port From (https://github.com/TrinityCore/TrinityCore/commit/3f79c9f69674618a7d7e2bf8484f9ec6ce15b2df)
This commit is contained in:
@@ -384,6 +384,18 @@ namespace Game.AI
|
||||
return me.SummonCreature(entry, pos, summonType, despawnTime);
|
||||
}
|
||||
|
||||
public static bool IsInBounds(List<AreaBoundary> boundary, Position pos)
|
||||
{
|
||||
if (boundary == null)
|
||||
return true;
|
||||
|
||||
foreach (AreaBoundary areaBoundary in boundary)
|
||||
if (!areaBoundary.IsWithinBoundary(pos))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void SetBoundary(List<AreaBoundary> boundary)
|
||||
{
|
||||
_boundary = boundary;
|
||||
|
||||
Reference in New Issue
Block a user