summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorStefan Dombrowski <stefan@uni-bonn.de>2009-11-14 23:11:18 +0100
committerJared Adams <jaxad0127@gmail.com>2009-11-14 16:17:42 -0700
commit5c8a2bb5349b71040b74bc44e10db0b80290e904 (patch)
tree97af71e421f1a6accdba6c98a0635bea22bfbca0 /src/net
parent726dc225fb615b22edeb70880356aa3099e0b472 (diff)
downloadmana-client-5c8a2bb5349b71040b74bc44e10db0b80290e904.tar.gz
mana-client-5c8a2bb5349b71040b74bc44e10db0b80290e904.tar.bz2
mana-client-5c8a2bb5349b71040b74bc44e10db0b80290e904.tar.xz
mana-client-5c8a2bb5349b71040b74bc44e10db0b80290e904.zip
Fix display of non-existing items in storage window
If there are only equipable items in the storage, then the server does not send a SMSG_PLAYER_STORAGE_ITEMS message. In that case the storage did not get cleared.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/inventoryhandler.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 94118ae2..f24b2d0a 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -90,16 +90,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
clearEquipment();
inventory->clear();
}
- else
- {
- /*
- * This packet will always be followed by a
- * SMSG_PLAYER_STORAGE_EQUIP packet. The two packets
- * together comprise a complete refresh of storage, so
- * clear storage here
- */
- storage->clear();
- }
+
msg.readInt16(); // length
number = (msg.getLength() - 4) / 18;
@@ -287,6 +278,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg)
/*
* Storage access has been closed
*/
+ storage->clear();
player_node->setInStorage(false);
break;
}