feat: show attackes in list and map
This commit is contained in:
@ -26,6 +26,8 @@ namespace Client.Application.ViewModels
|
||||
|
||||
public bool IsTarget => Id == hero.TargetId;
|
||||
|
||||
public bool IsAttacker => hero.AttackerIds.Contains(creature.Id);
|
||||
|
||||
public ICommand MouseLeftClickCommand { get; }
|
||||
public ICommand MouseLeftDoubleClickCommand { get; }
|
||||
public ICommand MouseRightClickCommand { get; }
|
||||
@ -90,6 +92,10 @@ namespace Client.Application.ViewModels
|
||||
{
|
||||
OnPropertyChanged("IsTarget");
|
||||
}
|
||||
if (e.PropertyName == "AttackerIds")
|
||||
{
|
||||
OnPropertyChanged("IsAttacker");
|
||||
}
|
||||
}
|
||||
|
||||
private readonly CreatureInterface creature;
|
||||
|
@ -63,6 +63,7 @@ namespace Client.Application.ViewModels
|
||||
public bool IsTarget => Id == hero.TargetId;
|
||||
public bool IsAggressive => creature.AggroRadius > 0 && !creature.VitalStats.IsDead && creature.IsHostile;
|
||||
public float AggroRadius => creature.AggroRadius / scale;
|
||||
public bool IsAttacker => hero.AttackerIds.Contains(creature.Id);
|
||||
|
||||
public ICommand MouseLeftClickCommand { get; }
|
||||
public ICommand MouseLeftDoubleClickCommand { get; }
|
||||
@ -117,6 +118,10 @@ namespace Client.Application.ViewModels
|
||||
{
|
||||
OnPropertyChanged("IsTarget");
|
||||
}
|
||||
if (e.PropertyName == "AttackerIds")
|
||||
{
|
||||
OnPropertyChanged("IsAttacker");
|
||||
}
|
||||
}
|
||||
|
||||
private void HeroPosition_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
|
Reference in New Issue
Block a user