feat: change death logic

This commit is contained in:
Иванов Иван
2024-08-21 15:00:17 +02:00
parent ad7a4c3074
commit 4e2e108076
8 changed files with 64 additions and 12 deletions

View File

@@ -31,7 +31,7 @@ namespace L2Bot::Domain::Entities
WorldObject::Update(transform);
m_FullName = fullName;
m_VitalStats = vitalStats;
m_VitalStats.LoadFromOther(vitalStats);
m_Phenotype = phenotype;
m_ExperienceInfo = experienceInfo;
m_PermanentStats = permanentStats;
@@ -93,6 +93,10 @@ namespace L2Bot::Domain::Entities
{
m_AttackerIds.clear();
}
void MarkAsDead()
{
m_VitalStats.MarkAsDead();
}
const std::vector<Serializers::Node> BuildSerializationNodes() const override
{

View File

@@ -28,7 +28,7 @@ namespace L2Bot::Domain::Entities
m_IsHostile = isHostile;
m_NpcId = npcId;
m_FullName = fullName;
m_VitalStats = vitalStats;
m_VitalStats.LoadFromOther(vitalStats);
}
const size_t GetHash() const override
{
@@ -45,6 +45,10 @@ namespace L2Bot::Domain::Entities
{
return "npc";
}
void MarkAsDead()
{
m_VitalStats.MarkAsDead();
}
const std::vector<Serializers::Node> BuildSerializationNodes() const override
{

View File

@@ -19,7 +19,7 @@ namespace L2Bot::Domain::Entities
m_FullName = fullName;
m_Phenotype = phenotype;
m_VitalStats = vitalStats;
m_VitalStats.LoadFromOther(vitalStats);
}
const size_t GetHash() const override
{
@@ -34,6 +34,10 @@ namespace L2Bot::Domain::Entities
{
return "player";
}
void MarkAsDead()
{
m_VitalStats.MarkAsDead();
}
const std::vector<Serializers::Node> BuildSerializationNodes() const override
{