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)

View File

@@ -40,10 +40,19 @@
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<CheckBox Grid.Row="0" Grid.Column="0" IsChecked="{Binding AutoUseShots}">Auto use soul and spiritshots</CheckBox>
<CheckBox Grid.Row="1" Grid.Column="0" IsChecked="{Binding UseOnlySkills}">Use only skills</CheckBox>
<StackPanel Grid.Row="2" Grid.Column="0">
<Label>Pathfinder max passable height:</Label>
<TextBox Width="100" HorizontalAlignment="Left">
<TextBox.Text>
<Binding Path="MaxPassableHeight" UpdateSourceTrigger="PropertyChanged"/>
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="3" Grid.Column="0">
<Label>Attack distance for mili weapon:</Label>
<TextBox Width="100" HorizontalAlignment="Left">
<TextBox.Text>
@@ -51,7 +60,7 @@
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="3" Grid.Column="0">
<StackPanel Grid.Row="4" Grid.Column="0">
<Label>Attack distance for bows:</Label>
<TextBox Width="100" HorizontalAlignment="Left">
<TextBox.Text>
@@ -59,7 +68,7 @@
</TextBox.Text>
</TextBox>
</StackPanel>
<StackPanel Grid.Row="4" Grid.Column="0">
<StackPanel Grid.Row="5" Grid.Column="0">
<Label>Skill conditions:</Label>
<DataGrid
AutoGenerateColumns="False"
@@ -91,7 +100,7 @@
</DataGrid.Columns>
</DataGrid>
</StackPanel>
<StackPanel Grid.Row="5" Grid.Column="0">
<StackPanel Grid.Row="6" Grid.Column="0">
<Label>Combat zone:</Label>
<Grid>
<Grid.ColumnDefinitions>