fix: fix dead state for hero

This commit is contained in:
Иванов Иван
2024-08-23 17:29:50 +02:00
parent e0ffa3a62e
commit ca86371137
5 changed files with 2 additions and 30 deletions

View File

@@ -93,10 +93,6 @@ namespace L2Bot::Domain::Entities
{
m_AttackerIds.clear();
}
void MarkAsDead()
{
m_VitalStats.MarkAsDead();
}
const std::vector<Serializers::Node> BuildSerializationNodes() const override
{

View File

@@ -34,10 +34,6 @@ namespace L2Bot::Domain::Entities
{
return "player";
}
void MarkAsDead()
{
m_VitalStats.MarkAsDead();
}
const std::vector<Serializers::Node> BuildSerializationNodes() const override
{

View File

@@ -12,7 +12,7 @@ namespace L2Bot::Domain::ValueObjects
public:
const bool IsDead() const
{
return m_IsDead || (m_MaxHp > 0 && m_Hp < 0);
return m_IsDead || (m_MaxHp > 0 && m_Hp <= 0);
}
const uint32_t GetMaxHp() const
{
@@ -70,7 +70,7 @@ namespace L2Bot::Domain::ValueObjects
{ L"mp", std::to_wstring(m_Mp) },
{ L"maxCp", std::to_wstring(m_MaxCp) },
{ L"cp", std::to_wstring(m_Cp) },
{ L"isDead", std::to_wstring(m_IsDead) }
{ L"isDead", std::to_wstring(IsDead()) }
};
}
void MarkAsDead()