summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/ea/inventoryhandler.cpp6
-rw-r--r--src/net/ea/tradehandler.cpp5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 79e7d2da..423d2e9c 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -353,8 +353,8 @@ void InventoryHandler::moveItem(StorageType source, int slot, int amount,
}
else if (source == STORAGE && destination == INVENTORY)
{
- MessageOut outMsg(CSMG_MOVE_FROM_STORAGE);
- outMsg.writeInt16(slot + STORAGE_OFFSET);
- outMsg.writeInt32(amount);
+ MessageOut outMsg(CSMG_MOVE_FROM_STORAGE);
+ outMsg.writeInt16(slot + STORAGE_OFFSET);
+ outMsg.writeInt32(amount);
}
}
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index 3a6ebe07..f711f3c4 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -166,7 +166,7 @@ void TradeHandler::handleMessage(MessageIn &msg)
case SMSG_TRADE_ITEM_ADD_RESPONSE:
// Trade: New Item add response (was 0x00ea, now 01b1)
{
- const int index = msg.readInt16();
+ const int index = msg.readInt16() - INVENTORY_OFFSET;
Item *item = player_node->getInventory()->getItem(index);
if (!item)
{
@@ -247,6 +247,7 @@ void TradeHandler::addItem(int slotNum, int amount)
void TradeHandler::removeItem(int slotNum, int amount)
{
+ // TODO
}
void TradeHandler::setMoney(int amount)
@@ -268,5 +269,5 @@ void TradeHandler::finish()
void TradeHandler::cancel()
{
- MessageOut outMsg(CMSG_TRADE_CANCEL_REQUEST);
+ MessageOut outMsg(CMSG_TRADE_CANCEL_REQUEST);
}