summaryrefslogtreecommitdiff
path: root/src/gui/npcpostdialog.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-08-12 19:43:51 -0600
committerJared Adams <jaxad0127@gmail.com>2010-08-12 20:07:04 -0600
commit2293b1c5ef0bb7378140bf73f1fef03a4504bdd2 (patch)
treeb3df7512fd0e48e8b1b3a0ed3cbd6d5e9d149ad2 /src/gui/npcpostdialog.cpp
parent71595e5db41f503f06401c59090748b46e9731f0 (diff)
downloadmana-2293b1c5ef0bb7378140bf73f1fef03a4504bdd2.tar.gz
mana-2293b1c5ef0bb7378140bf73f1fef03a4504bdd2.tar.bz2
mana-2293b1c5ef0bb7378140bf73f1fef03a4504bdd2.tar.xz
mana-2293b1c5ef0bb7378140bf73f1fef03a4504bdd2.zip
Replace most of Net::NpcHandler with events
Reviewed-by: Chuck Miller
Diffstat (limited to 'src/gui/npcpostdialog.cpp')
-rw-r--r--src/gui/npcpostdialog.cpp10
1 files changed, 5 insertions, 5 deletions
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);
}