From c4d16b36a373ba5609360e2698372926d7f2dc0f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 11 May 2013 17:36:03 +0300 Subject: Allow load avatars from avatars.xml --- src/being.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/being.cpp') diff --git a/src/being.cpp b/src/being.cpp index de5ecc56e..efbfa35c6 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -48,6 +48,7 @@ #include "net/npchandler.h" #include "net/playerhandler.h" +#include "resources/avatardb.h" #include "resources/emotedb.h" #include "resources/iteminfo.h" #include "resources/monsterdb.h" @@ -251,6 +252,12 @@ void Being::setSubtype(const uint16_t subtype) mYDiff = mInfo->getSortOffsetY(); } } + else if (mType == AVATAR) + { + mInfo = AvatarDB::get(mSubType); + if (mInfo) + setupSpriteDisplay(mInfo->getDisplay(), false); + } else if (mType == PET) { mInfo = PETDB::get(mId); -- cgit v1.2.3-70-g09d2