summaryrefslogtreecommitdiff
path: root/src/gui/trade.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 23:25:43 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 23:28:19 +0100
commit4f02ad59df9ee3314fb0d429a031ecbfa3206e3a (patch)
tree90b7afc312b7385061d25db753e8d1e500c83e69 /src/gui/trade.cpp
parentf67237cb69599753192c301f0f2eb38b88f7b57a (diff)
downloadmana-client-4f02ad59df9ee3314fb0d429a031ecbfa3206e3a.tar.gz
mana-client-4f02ad59df9ee3314fb0d429a031ecbfa3206e3a.tar.bz2
mana-client-4f02ad59df9ee3314fb0d429a031ecbfa3206e3a.tar.xz
mana-client-4f02ad59df9ee3314fb0d429a031ecbfa3206e3a.zip
Moved the inventory and storage offset handling into netcode
No need to complicate the item containers and inventory classes with a silly offset used by the eAthena server. Also fixed the logToStandardOut option by reading it from the config after the configuration has been initialized.
Diffstat (limited to 'src/gui/trade.cpp')
-rw-r--r--src/gui/trade.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 6926eb82..e6df9ad8 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -53,13 +53,10 @@
TradeWindow::TradeWindow():
Window(_("Trade: You")),
-#ifdef EATHENA_SUPPORT
- mMyInventory(new Inventory(INVENTORY_SIZE, 2)),
- mPartnerInventory(new Inventory(INVENTORY_SIZE, 2))
-#else
mMyInventory(new Inventory(INVENTORY_SIZE)),
- mPartnerInventory(new Inventory(INVENTORY_SIZE)),
- mStatus(PREPARING)
+ mPartnerInventory(new Inventory(INVENTORY_SIZE))
+#ifdef TMWSERV_SUPPORT
+ , mStatus(PREPARING)
#endif
{
setWindowName("Trade");
@@ -248,7 +245,7 @@ void TradeWindow::tradeItem(Item *item, int quantity)
// for that version only.
//addItem(item->getId(), true, quantity, item->isEquipment());
MessageOut outMsg(CMSG_TRADE_ITEM_ADD_REQUEST);
- outMsg.writeInt16(item->getInvIndex());
+ outMsg.writeInt16(item->getInvIndex() + INVENTORY_OFFSET);
outMsg.writeInt32(quantity);
#endif
}