summaryrefslogtreecommitdiff
path: root/src/net/tradehandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-06-12 09:06:01 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-06-12 09:06:01 +0000
commit2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258 (patch)
tree8d256ac1a38932aaf0db7b55ed178e4212616555 /src/net/tradehandler.cpp
parenteb019ab915998a3ec247b33dad4b23f763d7a29a (diff)
downloadmana-2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258.tar.gz
mana-2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258.tar.bz2
mana-2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258.tar.xz
mana-2f8ee95fbacb71e7cbca85fcc11e6f9f7e36c258.zip
Merged revisions 3738 via svnmerge from
https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/trunk ........ r3738 | b_lindeijer | 2007-11-16 00:44:01 +0100 (Fri, 16 Nov 2007) | 3 lines Moved item icon from ItemInfo class to the Item class, so that it can be loaded on demand. Results in faster startup time and reduced memory usage. ........
Diffstat (limited to 'src/net/tradehandler.cpp')
-rw-r--r--src/net/tradehandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net/tradehandler.cpp b/src/net/tradehandler.cpp
index 9b3c590e..85ab65c1 100644
--- a/src/net/tradehandler.cpp
+++ b/src/net/tradehandler.cpp
@@ -26,6 +26,7 @@
#include "messagein.h"
#include "protocol.h"
+#include "../inventory.h"
#include "../item.h"
#include "../localplayer.h"
#include "../player_relations.h"
@@ -157,7 +158,8 @@ void TradeHandler::handleMessage(MessageIn *msg)
case SMSG_TRADE_ITEM_ADD_RESPONSE:
// Trade: New Item add response (was 0x00ea, now 01b1)
{
- Item *item = player_node->getInvItem(msg->readInt16());
+ const int index = msg->readInt16();
+ Item *item = player_node->getInventory()->getItem(index);
Sint16 quantity = msg->readInt16();
switch (msg->readInt8())