summaryrefslogtreecommitdiff
path: root/src/gui/sell.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-31 15:11:26 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-31 15:11:26 -0600
commit37432edac65a6b85c7a3414a421f2afd3e67a14e (patch)
treea4dc561371fab9d1800aec72960d7f86a1e88135 /src/gui/sell.cpp
parent2c5f308192d18b5447a5b0e2ee3428984c1f1b78 (diff)
downloadmana-client-37432edac65a6b85c7a3414a421f2afd3e67a14e.tar.gz
mana-client-37432edac65a6b85c7a3414a421f2afd3e67a14e.tar.bz2
mana-client-37432edac65a6b85c7a3414a421f2afd3e67a14e.tar.xz
mana-client-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/sell.cpp')
-rw-r--r--src/gui/sell.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 1057c2e9..3b4e9982 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -34,11 +34,10 @@
#include "shopitem.h"
#include "units.h"
-#include "net/messageout.h"
#ifdef TMWSERV_SUPPORT
#include "net/tmwserv/gameserver/player.h"
#else
-#include "net/ea/protocol.h"
+#include "net/ea/npchandler.h"
#endif
#include "resources/iteminfo.h"
@@ -207,14 +206,12 @@ void SellDialog::action(const gcn::ActionEvent &event)
mAmountItems * mShopItems->at(selectedItem)->getPrice();
mMaxItems -= mAmountItems;
while (mAmountItems > 0) {
- MessageOut outMsg(CMSG_NPC_SELL_REQUEST);
- outMsg.writeInt16(8);
- outMsg.writeInt16(item->getCurrentInvIndex() + 2);
// This order is important, item->getCurrentInvIndex() would return
// the inventory index of the next Duplicate otherwise.
sellCount = item->sellCurrentDuplicate(mAmountItems);
mAmountItems -= sellCount;
- outMsg.writeInt16(sellCount);
+ // Net::getNpcHandler()->sellItem(current_npc, item->getCurrentInvIndex(), sellCount);
+ npcHandler->sellItem(current_npc, item->getCurrentInvIndex(), sellCount);
}
#endif