From 5c8a2bb5349b71040b74bc44e10db0b80290e904 Mon Sep 17 00:00:00 2001 From: Stefan Dombrowski Date: Sat, 14 Nov 2009 23:11:18 +0100 Subject: 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. --- src/net/ea/inventoryhandler.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/net') 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; } -- cgit v1.2.3-70-g09d2