summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp13
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);