diff options
Diffstat (limited to 'src/gui/npcpostdialog.cpp')
-rw-r--r-- | src/gui/npcpostdialog.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp index 19d0cf61..6bc79017 100644 --- a/src/gui/npcpostdialog.cpp +++ b/src/gui/npcpostdialog.cpp @@ -21,10 +21,10 @@ #include "gui/npcpostdialog.h" -#include "npc.h" +#include "eventmanager.h" +#include "playerinfo.h" #include "gui/widgets/button.h" -#include "gui/widgets/chattab.h" #include "gui/widgets/label.h" #include "gui/widgets/textbox.h" #include "gui/widgets/textfield.h" @@ -80,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) @@ -93,8 +96,7 @@ void NpcPostDialog::action(const gcn::ActionEvent &event) { if (mSender->getText().empty() || mText->getText().empty()) { - localChatTab->chatLog(_("Failed to send as sender or letter " - "invalid.")); + SERVER_NOTICE(_("Failed to send as sender or letter invalid.")) } else { |