feat: add outgoing messages to client

This commit is contained in:
k0t9i
2023-02-09 22:45:08 +04:00
parent abcf3b20c0
commit ad5d7a5159
25 changed files with 739 additions and 74 deletions

View File

@@ -74,7 +74,7 @@ namespace Client.Domain.Entities
{
string result = FullName.Nickname;
if (IsDead())
if (VitalStats.IsDead)
{
result += " (dead)";
}
@@ -124,17 +124,12 @@ namespace Client.Domain.Entities
private void VitalStats_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName == "Hp" || e.PropertyName == "MaxHp")
if (e.PropertyName == "IsDead")
{
OnPropertyChanged("Name");
}
}
public bool IsDead()
{
return VitalStats.MaxHp > 0 && VitalStats.Hp <= 0;
}
private uint level;
private uint aggroRadius;
private VitalStats vitalStats;