diff options
Diffstat (limited to 'src/gui/npcpostdialog.cpp')
-rw-r--r-- | src/gui/npcpostdialog.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp index 7a85dda5..c53203be 100644 --- a/src/gui/npcpostdialog.cpp +++ b/src/gui/npcpostdialog.cpp @@ -30,6 +30,9 @@ #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; @@ -97,11 +100,9 @@ void NpcPostDialog::action(const gcn::ActionEvent &event) } else { - Mana::Event event(EVENT_DOSENDLETTER); - event.setInt("npcId", mNpcId); - event.setString("recipient", mSender->getText()); - event.setString("text", mText->getText()); - event.trigger(CHANNEL_NPC); + Net::getNpcHandler()->sendLetter(mNpcId, + mSender->getText(), + mText->getText()); } setVisible(false); } |