From 0d154a04d5f82c485c3b43cc601d4d4ea801360d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 23 Sep 2014 17:42:56 +0300 Subject: Use petdb for drawing pets. --- src/being/being.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2