summaryrefslogtreecommitdiff
path: root/src/gui/storagewindow.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-01 11:09:41 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-01 11:09:41 -0600
commit2a11fd111231a7e40c560e0240578a2b4a2126c2 (patch)
treee6024c5e40fc96ad4ec85b8e4136a4982a35eb02 /src/gui/storagewindow.cpp
parent33048e36c1fdc642459b0101ad0ab9c63807a3e7 (diff)
downloadmana-2a11fd111231a7e40c560e0240578a2b4a2126c2.tar.gz
mana-2a11fd111231a7e40c560e0240578a2b4a2126c2.tar.bz2
mana-2a11fd111231a7e40c560e0240578a2b4a2126c2.tar.xz
mana-2a11fd111231a7e40c560e0240578a2b4a2126c2.zip
Make eAthena's inventory handler
Also cleanup some related #ifdefs in LocalPlayer.
Diffstat (limited to 'src/gui/storagewindow.cpp')
-rw-r--r--src/gui/storagewindow.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/gui/storagewindow.cpp b/src/gui/storagewindow.cpp
index 8c25401d..59b6de7a 100644
--- a/src/gui/storagewindow.cpp
+++ b/src/gui/storagewindow.cpp
@@ -41,10 +41,8 @@
#include "../localplayer.h"
#include "../units.h"
-#include "../net/messageout.h"
-#ifdef EATHENA_SUPPORT
-#include "../net/ea/protocol.h"
-#endif
+#include "../net/net.h"
+#include "../net/ea/inventoryhandler.h"
#include "../resources/iteminfo.h"
@@ -187,21 +185,24 @@ Item* StorageWindow::getSelectedItem() const
return mItems->getSelectedItem();
}
-void StorageWindow::addStore(Item *item, int ammount)
+void StorageWindow::addStore(Item *item, int amount)
{
- MessageOut outMsg(CMSG_MOVE_TO_STORAGE);
- outMsg.writeInt16(item->getInvIndex() + INVENTORY_OFFSET);
- outMsg.writeInt32(ammount);
+ // Net::getInvyHandler()->moveItem(Net::InvyHandler::INVENTORY,
+ invyHandler->moveItem(Net::InvyHandler::INVENTORY,
+ item->getInvIndex(), amount,
+ Net::InvyHandler::STORAGE);
}
-void StorageWindow::removeStore(Item *item, int ammount)
+void StorageWindow::removeStore(Item *item, int amount)
{
- MessageOut outMsg(CSMG_MOVE_FROM_STORAGE);
- outMsg.writeInt16(item->getInvIndex() + STORAGE_OFFSET);
- outMsg.writeInt32(ammount);
+ // Net::getInvyHandler()->moveItem(Net::InvyHandler::STORAGE,
+ invyHandler->moveItem(Net::InvyHandler::STORAGE,
+ item->getInvIndex(), amount,
+ Net::InvyHandler::INVENTORY);
}
void StorageWindow::close()
{
- MessageOut outMsg(CMSG_CLOSE_STORAGE);
+ // Net::getInvyHandler()->closeStorage();
+ invyHandler->closeStorage();
}