diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-21 16:06:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-21 16:06:46 +0300 |
commit | 18c58a907df45b271536c0f852c347e41846df07 (patch) | |
tree | 0560ea5732931e903a94a7c9255c4d4d4fa60d39 /src/being | |
parent | 691928f93da5874e62171f569baeb7e3c73e2c16 (diff) | |
download | mv-18c58a907df45b271536c0f852c347e41846df07.tar.gz mv-18c58a907df45b271536c0f852c347e41846df07.tar.bz2 mv-18c58a907df45b271536c0f852c347e41846df07.tar.xz mv-18c58a907df45b271536c0f852c347e41846df07.zip |
Add mercenary db.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 14 |
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); |