diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-23 17:42:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-23 17:42:56 +0300 |
commit | 0d154a04d5f82c485c3b43cc601d4d4ea801360d (patch) | |
tree | 629e918684bd03bc8d096b5f78345c67b1253b28 | |
parent | 7f889f92a410de52b45093d1592bd3cceeecba4f (diff) | |
download | manaverse-0d154a04d5f82c485c3b43cc601d4d4ea801360d.tar.gz manaverse-0d154a04d5f82c485c3b43cc601d4d4ea801360d.tar.bz2 manaverse-0d154a04d5f82c485c3b43cc601d4d4ea801360d.tar.xz manaverse-0d154a04d5f82c485c3b43cc601d4d4ea801360d.zip |
Use petdb for drawing pets.
-rw-r--r-- | src/being/being.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 102a5b440..fd71e5f9a 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -303,7 +303,7 @@ void Being::setSubtype(const uint16_t subtype, const uint8_t look) mSubType = subtype; mLook = look; - if (mType == ActorType::Monster || mType == ActorType::Pet) + if (mType == ActorType::Monster) { mInfo = MonsterDB::get(mSubType); if (mInfo) @@ -314,6 +314,17 @@ void Being::setSubtype(const uint16_t subtype, const uint8_t look) mYDiff = mInfo->getSortOffsetY(); } } + if (mType == ActorType::Pet) + { + mInfo = PETDB::get(mSubType); + if (mInfo) + { + setName(mInfo->getName()); + setupSpriteDisplay(mInfo->getDisplay(), true, 0, + mInfo->getColor(mLook)); + mYDiff = mInfo->getSortOffsetY(); + } + } else if (mType == ActorType::Mercenary) { mInfo = MercenaryDB::get(mSubType); |