diff options
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 33 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.h | 1 |
2 files changed, 16 insertions, 18 deletions
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 1f6d0e2a2..c3ddc6c0c 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -71,7 +71,6 @@ namespace Ea EquipBackend InventoryHandler::mEquips; InventoryItems InventoryHandler::mInventoryItems; Inventory *InventoryHandler::mStorage = nullptr; -InventoryWindow *InventoryHandler::mStorageWindow = nullptr; PickupQueue InventoryHandler::mSentPickups; bool InventoryHandler::mDebugInventory = true; @@ -80,7 +79,7 @@ InventoryHandler::InventoryHandler() mEquips.clear(); mInventoryItems.clear(); mStorage = nullptr; - mStorageWindow = nullptr; + storageWindow = nullptr; while (!mSentPickups.empty()) mSentPickups.pop(); mDebugInventory = true; @@ -88,10 +87,10 @@ InventoryHandler::InventoryHandler() InventoryHandler::~InventoryHandler() { - if (mStorageWindow) + if (storageWindow) { - mStorageWindow->close(); - mStorageWindow = nullptr; + storageWindow->close(); + storageWindow = nullptr; } delete2(mStorage); @@ -263,10 +262,10 @@ void InventoryHandler::processPlayerStorageStatus(Net::MessageIn &msg) } mInventoryItems.clear(); - if (!mStorageWindow) + if (!storageWindow) { - mStorageWindow = new InventoryWindow(mStorage); - mStorageWindow->postInit(); + storageWindow = new InventoryWindow(mStorage); + storageWindow->postInit(); } BLOCK_END("InventoryHandler::processPlayerStorageStatus") } @@ -294,12 +293,12 @@ void InventoryHandler::processPlayerStorageClose(Net::MessageIn &msg A_UNUSED) BLOCK_START("InventoryHandler::processPlayerStorageClose") // Storage access has been closed // Storage window deletes itself - if (mStorageWindow) + if (storageWindow) { - mStorageWindow->unsetInventory(); - mStorageWindow->close(); + storageWindow->unsetInventory(); + storageWindow->close(); } - mStorageWindow = nullptr; + storageWindow = nullptr; if (mStorage) mStorage->clear(); @@ -335,18 +334,18 @@ void InventoryHandler::processPlayerArrowEquip(Net::MessageIn &msg) void InventoryHandler::closeStorage() { BLOCK_START("InventoryHandler::closeStorage") - if (mStorageWindow) + if (storageWindow) { - mStorageWindow->unsetInventory(); - mStorageWindow->close(); - mStorageWindow = nullptr; + storageWindow->unsetInventory(); + storageWindow->close(); + storageWindow = nullptr; } BLOCK_END("InventoryHandler::closeStorage") } void InventoryHandler::forgotStorage() { - mStorageWindow = nullptr; + storageWindow = nullptr; } } // namespace Ea diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 734e894f0..3e393a98c 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -107,7 +107,6 @@ class InventoryHandler notfinal : public Net::InventoryHandler static EquipBackend mEquips; static InventoryItems mInventoryItems; static Inventory *mStorage; - static InventoryWindow *mStorageWindow; static PickupQueue mSentPickups; static bool mDebugInventory; }; |