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