summaryrefslogtreecommitdiff
path: root/src/gui/npcpostdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npcpostdialog.cpp')
-rw-r--r--src/gui/npcpostdialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp
index 74173ae9..6bc79017 100644
--- a/src/gui/npcpostdialog.cpp
+++ b/src/gui/npcpostdialog.cpp
@@ -22,6 +22,7 @@
#include "gui/npcpostdialog.h"
#include "eventmanager.h"
+#include "playerinfo.h"
#include "gui/widgets/button.h"
#include "gui/widgets/label.h"
@@ -79,11 +80,14 @@ NpcPostDialog::NpcPostDialog(int npcId):
instances.push_back(this);
setVisible(true);
+
+ PlayerInfo::setNPCPostCount(PlayerInfo::getNPCPostCount() + 1);
}
NpcPostDialog::~NpcPostDialog()
{
instances.remove(this);
+ PlayerInfo::setNPCPostCount(PlayerInfo::getNPCPostCount() - 1);
}
void NpcPostDialog::action(const gcn::ActionEvent &event)