feat: add max passable height to AI config

This commit is contained in:
Иванов Иван
2024-08-22 09:45:11 +02:00
parent d0baa5c21a
commit 936697defc
16 changed files with 46 additions and 39 deletions

View File

@ -117,6 +117,7 @@ namespace Client.Application.ViewModels
public byte DelevelingTargetLevel { get => delevelingTargetLevel; set { if (value != delevelingTargetLevel) { delevelingTargetLevel = value; OnPropertyChanged(); } } }
public uint DelevelingAttackDistance { get => delevelingAttackDistance; set { if (value != delevelingAttackDistance) { delevelingAttackDistance = value; OnPropertyChanged(); } } }
public uint DelevelingSkillId { get => delevelingSkillId; set { if (value != delevelingSkillId) { delevelingSkillId = value; OnPropertyChanged(); } } }
public byte MaxPassableHeight { get => maxPassableHeight; set { if (value != maxPassableHeight) { maxPassableHeight = value; OnPropertyChanged(); } } }
public void LoadConfig()
{
@ -151,6 +152,7 @@ namespace Client.Application.ViewModels
DelevelingTargetLevel = config.Deleveling.TargetLevel;
DelevelingAttackDistance = config.Deleveling.AttackDistance;
DelevelingSkillId = config.Deleveling.SkillId;
MaxPassableHeight = config.Combat.MaxPassableHeight;
}
private void SaveConfig()
@ -181,6 +183,7 @@ namespace Client.Application.ViewModels
config.Deleveling.TargetLevel = DelevelingTargetLevel;
config.Deleveling.AttackDistance = DelevelingAttackDistance;
config.Deleveling.SkillId = DelevelingSkillId;
config.Combat.MaxPassableHeight = MaxPassableHeight;
SaveCollections();
}
@ -318,7 +321,7 @@ namespace Client.Application.ViewModels
private readonly ConfigDeserializerInterface configDeserializer;
private uint mobsMaxDeltaZ = 0;
private byte? mobLevelLowerLimit = null;
private byte? mobLevelUpperLimit = null;
private byte maxPassableHeight = 0;
private bool spoilIfPossible = false;
private bool spoilIsPriority = false;
private uint spoilSkillId = 0;
@ -340,5 +343,6 @@ namespace Client.Application.ViewModels
private byte delevelingTargetLevel = 0;
private uint delevelingAttackDistance = 0;
private uint delevelingSkillId = 0;
private byte? mobLevelUpperLimit = null;
}
}

View File

@ -43,7 +43,7 @@ namespace Client.Application.ViewModels
private async Task OnMouseRightClick(object? obj)
{
await pathMover.MoveUntilReachedAsync(creature.Transform.Position);
await pathMover.MoveAsync(creature.Transform.Position);
}
public CreatureListViewModel(WorldHandler worldHandler, AsyncPathMoverInterface pathMover, CreatureInterface creature, Hero hero)

View File

@ -89,7 +89,7 @@ namespace Client.Application.ViewModels
private async Task OnMouseRightClick(object? obj)
{
await pathMover.MoveUntilReachedAsync(creature.Transform.Position);
await pathMover.MoveAsync(creature.Transform.Position);
}
public CreatureMapViewModel(WorldHandler worldHandler, AsyncPathMoverInterface pathMover, CreatureInterface creature, Hero hero)

View File

@ -76,7 +76,7 @@ namespace Client.Application.ViewModels
}
private async Task OnMouseRightClick(object? obj)
{
await pathMover.MoveUntilReachedAsync(drop.Transform.Position);
await pathMover.MoveAsync(drop.Transform.Position);
}
public DropListViewModel(WorldHandler worldHandler, AsyncPathMoverInterface pathMover, Drop drop, Hero hero)

View File

@ -64,7 +64,7 @@ namespace Client.Application.ViewModels
}
private async Task OnMouseRightClick(object? obj)
{
await pathMover.MoveUntilReachedAsync(drop.Transform.Position);
await pathMover.MoveAsync(drop.Transform.Position);
}
public DropMapViewModel(WorldHandler worldHandler, AsyncPathMoverInterface pathMover, Drop drop, Hero hero)

View File

@ -169,7 +169,7 @@ namespace Client.Application.ViewModels
hero.Transform.Position.Z
);
await pathMover.MoveUntilReachedAsync(location);
await pathMover.MoveAsync(location);
}
public void OnMouseWheel(object sender, MouseWheelEventArgs e)