feat: add outgoing messages to client
This commit is contained in:
@@ -18,6 +18,6 @@ namespace Client.Domain.Entities
|
||||
string BriefInfo { get; }
|
||||
CreatureTypeEnum Type { get; }
|
||||
uint AggroRadius { get; set; }
|
||||
|
||||
bool IsHostile { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -62,6 +62,7 @@ namespace Client.Domain.Entities
|
||||
}
|
||||
}
|
||||
public uint AggroRadius { get; set; } = 0;
|
||||
public bool IsHostile { get; set; } = false;
|
||||
|
||||
public Hero(uint id, Transform transform, FullName fullName, VitalStats vitalStats, Phenotype phenotype, ExperienceInfo experienceInfo, PermanentStats permanentStats, VariableStats variableStats, Reputation reputation, InventoryInfo inventoryInfo, uint targetId, bool isStanding)
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -62,6 +62,7 @@ namespace Client.Domain.Entities
|
||||
public VitalStats VitalStats { get => vitalStats; set => vitalStats = value; }
|
||||
public CreatureTypeEnum Type { get => CreatureTypeEnum.Player; }
|
||||
public uint AggroRadius { get; set; } = 0;
|
||||
public bool IsHostile { get; set; } = false;
|
||||
|
||||
public Player(uint id, Transform transform, FullName fullName, Phenotype phenotype)
|
||||
{
|
||||
|
Reference in New Issue
Block a user