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.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 828ed776..c9eaff10 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -22,6 +22,7 @@
#include "gui/npcdialog.h"
#include "configuration.h"
+#include "playerinfo.h"
#include "gui/setup.h"
@@ -123,6 +124,8 @@ NpcDialog::NpcDialog(int npcId)
requestFocus();
config.addListener("logNpcInGui", this);
+ PlayerInfo::setNPCInteractionCount(PlayerInfo::getNPCInteractionCount()
+ + 1);
}
NpcDialog::~NpcDialog()
@@ -139,6 +142,8 @@ NpcDialog::~NpcDialog()
instances.remove(this);
config.removeListener("logNpcInGui", this);
+ PlayerInfo::setNPCInteractionCount(PlayerInfo::getNPCInteractionCount()
+ - 1);
}
void NpcDialog::setText(const std::string &text)