diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-31 15:36:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-31 21:56:05 +0300 |
commit | 3a54cf61c4ea127a16ca11c515906a5f419b97df (patch) | |
tree | 7b330747d4357c95791f578eeda0356c8649e614 /src/gui/npcdialog.cpp | |
parent | 741630d53aa385f192edb40ac27b00844285eac8 (diff) | |
download | mv-3a54cf61c4ea127a16ca11c515906a5f419b97df.tar.gz mv-3a54cf61c4ea127a16ca11c515906a5f419b97df.tar.bz2 mv-3a54cf61c4ea127a16ca11c515906a5f419b97df.tar.xz mv-3a54cf61c4ea127a16ca11c515906a5f419b97df.zip |
Add default avatars support for npcs.
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r-- | src/gui/npcdialog.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index fa4162f81..df534c8e0 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -22,6 +22,7 @@ #include "gui/npcdialog.h" +#include "actorspritemanager.h" #include "being.h" #include "configuration.h" #include "client.h" @@ -42,6 +43,7 @@ #include "gui/widgets/scrollarea.h" #include "gui/widgets/textbox.h" +#include "resources/npcdb.h" #include "resources/resourcemanager.h" #include "net/net.h" @@ -166,6 +168,13 @@ NpcDialog::NpcDialog(const int npcId) : enableVisibleSound(true); sound.playGuiSound(SOUND_SHOW_WINDOW); + if (actorSpriteManager) + { + const Being *const being = actorSpriteManager->findBeing(mNpcId); + if (being) + showAvatar(NPCDB::getAvatarFor(being->getSubType())); + } + config.addListener("logNpcInGui", this); } |