summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 047d351fc..79b976049 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -73,6 +73,7 @@
#include "resources/db/avatardb.h"
#include "resources/db/emotedb.h"
#include "resources/db/itemdb.h"
+#include "resources/db/mercenarydb.h"
#include "resources/db/monsterdb.h"
#include "resources/db/npcdb.h"
#include "resources/db/petdb.h"
@@ -296,7 +297,7 @@ void Being::setSubtype(const uint16_t subtype, const uint8_t look)
mSubType = subtype;
mLook = look;
- if (mType == ActorType::Monster || mType == ActorType::Mercenary)
+ if (mType == ActorType::Monster)
{
mInfo = MonsterDB::get(mSubType);
if (mInfo)
@@ -307,6 +308,17 @@ void Being::setSubtype(const uint16_t subtype, const uint8_t look)
mYDiff = mInfo->getSortOffsetY();
}
}
+ else if (mType == ActorType::Mercenary)
+ {
+ mInfo = MercenaryDB::get(mSubType);
+ if (mInfo)
+ {
+ setName(mInfo->getName());
+ setupSpriteDisplay(mInfo->getDisplay(), true, 0,
+ mInfo->getColor(mLook));
+ mYDiff = mInfo->getSortOffsetY();
+ }
+ }
else if (mType == ActorType::Npc)
{
mInfo = NPCDB::get(mSubType);