feat: add max passable height to AI config
This commit is contained in:
@@ -33,6 +33,7 @@ namespace Client.Domain.AI
|
||||
public uint AttackDistanceBow { get; set; } = 500;
|
||||
public bool UseOnlySkills { get; set; } = false;
|
||||
public List<SkillCondition> SkillConditions { get; set; } = new List<SkillCondition>();
|
||||
public byte MaxPassableHeight { get; set; } = 30;
|
||||
|
||||
public bool SpoilIfPossible { get; set; } = true;
|
||||
public bool SpoilIsPriority { get; set; } = false;
|
||||
|
@@ -31,7 +31,7 @@ namespace Client.Domain.AI.State
|
||||
config.Combat.Zone.Center.X,
|
||||
config.Combat.Zone.Center.Y,
|
||||
hero.Transform.Position.Z
|
||||
));
|
||||
), config.Combat.MaxPassableHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ namespace Client.Domain.AI.State
|
||||
if (routeNeedsToBeAdjusted || distance >= Helper.GetAttackDistanceByConfig(worldHandler, config, hero, target) || !asyncPathMover.Pathfinder.HasLineOfSight(hero.Transform.Position, target.Transform.Position))
|
||||
{
|
||||
targetPosition = target.Transform.Position.Clone() as Vector3;
|
||||
asyncPathMover.MoveAsync(target.Transform.Position);
|
||||
asyncPathMover.MoveAsync(target.Transform.Position, config.Combat.MaxPassableHeight);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -13,10 +13,9 @@ namespace Client.Domain.Service
|
||||
{
|
||||
public PathfinderInterface Pathfinder { get; }
|
||||
public ObservableCollection<PathSegment> Path { get; }
|
||||
public Task<bool> MoveAsync(Vector3 location, ushort maxPassableHeight);
|
||||
public Task<bool> MoveAsync(Vector3 location);
|
||||
public Task MoveUntilReachedAsync(Vector3 location);
|
||||
public bool IsLocked { get; }
|
||||
|
||||
public void Unlock();
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ namespace Client.Domain.Service
|
||||
{
|
||||
public interface PathfinderInterface
|
||||
{
|
||||
public List<PathSegment> FindPath(Vector3 start, Vector3 end);
|
||||
public List<PathSegment> FindPath(Vector3 start, Vector3 end, ushort maxPassableHeight);
|
||||
public bool HasLineOfSight(Vector3 start, Vector3 end);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user