diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-11 17:36:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-11 17:36:03 +0300 |
commit | c4d16b36a373ba5609360e2698372926d7f2dc0f (patch) | |
tree | 62633ac84dafbe0a70574f1766105c0a42f10d79 /src/being.cpp | |
parent | d2502060c7f7b31385d2e3d836dbd7e91562a381 (diff) | |
download | manaplus-c4d16b36a373ba5609360e2698372926d7f2dc0f.tar.gz manaplus-c4d16b36a373ba5609360e2698372926d7f2dc0f.tar.bz2 manaplus-c4d16b36a373ba5609360e2698372926d7f2dc0f.tar.xz manaplus-c4d16b36a373ba5609360e2698372926d7f2dc0f.zip |
Allow load avatars from avatars.xml
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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); |