From 2293b1c5ef0bb7378140bf73f1fef03a4504bdd2 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 12 Aug 2010 19:43:51 -0600 Subject: Replace most of Net::NpcHandler with events Reviewed-by: Chuck Miller --- src/gui/npcpostdialog.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gui/npcpostdialog.cpp') diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp index 6bc79017..c35f77a3 100644 --- a/src/gui/npcpostdialog.cpp +++ b/src/gui/npcpostdialog.cpp @@ -30,9 +30,6 @@ #include "gui/widgets/textfield.h" #include "gui/widgets/scrollarea.h" -#include "net/net.h" -#include "net/npchandler.h" - #include "utils/gettext.h" NpcPostDialog::DialogList NpcPostDialog::instances; @@ -100,8 +97,11 @@ void NpcPostDialog::action(const gcn::ActionEvent &event) } else { - Net::getNpcHandler()->sendLetter(mNpcId, mSender->getText(), - mText->getText()); + Mana::Event event("doSendLetter"); + event.setInt("npcId", mNpcId); + event.setString("recipient", mSender->getText()); + event.setString("text", mText->getText()); + Mana::EventManager::trigger("NPC", event); } setVisible(false); } -- cgit v1.2.3-70-g09d2