summaryrefslogtreecommitdiff
path: root/src/net/tradehandler.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-06-14 16:59:25 +0000
committerDavid Athay <ko2fan@gmail.com>2008-06-14 16:59:25 +0000
commit3fcb588f254ccf5869842dfd1965decaf2008817 (patch)
treeaf1432da97e170506e8fd0a29d4559a38c4d8dae /src/net/tradehandler.cpp
parent5fbb6c822dcf01297a29078eb6abc552dcb8b80d (diff)
downloadmana-3fcb588f254ccf5869842dfd1965decaf2008817.tar.gz
mana-3fcb588f254ccf5869842dfd1965decaf2008817.tar.bz2
mana-3fcb588f254ccf5869842dfd1965decaf2008817.tar.xz
mana-3fcb588f254ccf5869842dfd1965decaf2008817.zip
Fixed trade bug again.
Diffstat (limited to 'src/net/tradehandler.cpp')
-rw-r--r--src/net/tradehandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/tradehandler.cpp b/src/net/tradehandler.cpp
index ed1536eb..af000b3b 100644
--- a/src/net/tradehandler.cpp
+++ b/src/net/tradehandler.cpp
@@ -159,12 +159,12 @@ void TradeHandler::handleMessage(MessageIn *msg)
// Trade: New Item add response (was 0x00ea, now 01b1)
{
const int index = msg->readInt16();
- if (index == 0)
+ Item *item = player_node->getInventory()->getItem(index);
+ if (!item)
{
tradeWindow->receivedOk(true);
return;
}
- Item *item = player_node->getInventory()->getItem(index);
Sint16 quantity = msg->readInt16();
switch (msg->readInt8())