From 18c58a907df45b271536c0f852c347e41846df07 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 21 Sep 2014 16:06:46 +0300 Subject: Add mercenary db. --- src/being/being.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/being') 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); -- cgit v1.2.3-60-g2f50