diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/inventoryhandler.cpp | 11 | ||||
-rw-r--r-- | src/net/playerhandler.cpp | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp index ebcca885..243d1e79 100644 --- a/src/net/inventoryhandler.cpp +++ b/src/net/inventoryhandler.cpp @@ -215,14 +215,13 @@ void InventoryHandler::handleMessage(MessageIn *msg) case SMSG_PLAYER_STORAGE_STATUS: /* - * Basic slots used vs total slots info - * We don't really need this information, but this is - * the closest we get to an "Open Storage" packet - * from the server. It always comes after the two - * SMSG_PLAYER_STORAGE_... packets that update - * storage contents. + * This is the closest we get to an "Open Storage" packet from the + * server. It always comes after the two SMSG_PLAYER_STORAGE_... + * packets that update storage contents. */ player_node->setInStorage(true); + msg->readInt16(); // Storage capacity + msg->readInt16(); // Used count break; case SMSG_PLAYER_STORAGE_ADD: diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index d99a97a5..4cc29568 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.cpp @@ -39,6 +39,7 @@ #include "../gui/ok_dialog.h" #include "../gui/sell.h" #include "../gui/skill.h" +#include "../gui/storagewindow.h" #include "../gui/viewport.h" #include "../utils/stringutils.h" @@ -92,7 +93,8 @@ namespace { buyDialog->setVisible(false); sellDialog->setVisible(false); buySellDialog->setVisible(false); - current_npc = 0; + + if (storageWindow->isVisible()) storageWindow->close(); } } deathListener; } |