summaryrefslogtreecommitdiff
path: root/src/game-server/spawnareacomponent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/spawnareacomponent.cpp')
-rw-r--r--src/game-server/spawnareacomponent.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game-server/spawnareacomponent.cpp b/src/game-server/spawnareacomponent.cpp
index 33bd5acd..da715f4f 100644
--- a/src/game-server/spawnareacomponent.cpp
+++ b/src/game-server/spawnareacomponent.cpp
@@ -71,7 +71,8 @@ void SpawnAreaComponent::update(Entity &entity)
being->addComponent(beingComponent);
being->addComponent(new MonsterComponent(*being, mSpecy));
- if (beingComponent->getModifiedAttribute(ATTR_MAX_HP) <= 0)
+ auto *hpAttribute = attributeManager->getAttributeInfo(ATTR_MAX_HP);
+ if (beingComponent->getModifiedAttribute(hpAttribute) <= 0)
{
LOG_WARN("Refusing to spawn dead monster " << mSpecy->getId());
delete being;