summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-05-05 14:20:12 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-05-11 23:31:16 +0200
commit633fad1a9c38a92da32907e763e1dab42c0dcf8d (patch)
tree869abc48347e72bc34831763792072c48aaaf0a9
parent78abc558e3dfab37480dc8f522e3389157d81149 (diff)
downloadmanaserv-633fad1a9c38a92da32907e763e1dab42c0dcf8d.tar.gz
manaserv-633fad1a9c38a92da32907e763e1dab42c0dcf8d.tar.xz
manaserv-633fad1a9c38a92da32907e763e1dab42c0dcf8d.zip
Fixed setting name of monsters
-rw-r--r--src/game-server/monster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp
index d5de45e..a40c24a 100644
--- a/src/game-server/monster.cpp
+++ b/src/game-server/monster.cpp
@@ -40,8 +40,6 @@ MonsterComponent::MonsterComponent(Entity &entity, MonsterClass *specy):
{
LOG_DEBUG("Monster spawned! (id: " << mSpecy->getId() << ").");
- auto *beingComponent = entity.getComponent<BeingComponent>();
-
auto *actorComponent = entity.getComponent<ActorComponent>();
actorComponent->setWalkMask(Map::BLOCKMASK_WALL |
Map::BLOCKMASK_CHARACTER);
@@ -51,6 +49,7 @@ MonsterComponent::MonsterComponent(Entity &entity, MonsterClass *specy):
/*
* Initialise the attribute structures.
*/
+ auto *beingComponent = entity.getComponent<BeingComponent>();
for (auto attrInfo : attributeManager->getAttributeScope(MonsterScope))
{
@@ -76,6 +75,7 @@ MonsterComponent::MonsterComponent(Entity &entity, MonsterClass *specy):
}
beingComponent->setGender(specy->getGender());
+ beingComponent->setName(specy->getName());
AbilityComponent *abilityComponent = new AbilityComponent(entity);
entity.addComponent(abilityComponent);