diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-31 15:11:26 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-31 15:11:26 -0600 |
commit | 37432edac65a6b85c7a3414a421f2afd3e67a14e (patch) | |
tree | a4dc561371fab9d1800aec72960d7f86a1e88135 /src/gui/buysell.cpp | |
parent | 2c5f308192d18b5447a5b0e2ee3428984c1f1b78 (diff) | |
download | mana-37432edac65a6b85c7a3414a421f2afd3e67a14e.tar.gz mana-37432edac65a6b85c7a3414a421f2afd3e67a14e.tar.bz2 mana-37432edac65a6b85c7a3414a421f2afd3e67a14e.tar.xz mana-37432edac65a6b85c7a3414a421f2afd3e67a14e.zip |
Add first draft of net handlers
eAthena NPC handler has been implemented and is being used for NPC
interraction.
Diffstat (limited to 'src/gui/buysell.cpp')
-rw-r--r-- | src/gui/buysell.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp index a0e2fc93..33e12e87 100644 --- a/src/gui/buysell.cpp +++ b/src/gui/buysell.cpp @@ -25,8 +25,7 @@ #include "gui/button.h" -#include "net/messageout.h" -#include "net/ea/protocol.h" +#include "net/ea/npchandler.h" #include "utils/gettext.h" @@ -77,25 +76,22 @@ void BuySellDialog::setVisible(bool visible) void BuySellDialog::action(const gcn::ActionEvent &event) { setVisible(false); - int action = 0; NPC::isTalking = false; if (event.getId() == "Buy") { - action = 0; + // Net::getNpcHandler()->buy(current_npc); + npcHandler->buy(current_npc); } else if (event.getId() == "Sell") { - action = 1; + // Net::getNpcHandler()->buy(current_npc); + npcHandler->sell(current_npc); } else if (event.getId() == "Cancel") { current_npc = 0; return; } - - MessageOut outMsg(CMSG_NPC_BUY_SELL_REQUEST); - outMsg.writeInt32(current_npc); - outMsg.writeInt8(action); } |