summaryrefslogtreecommitdiff
path: root/src/net/ea/inventoryhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-13 18:24:14 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-13 18:24:14 +0300
commita3b7888017c387d14e33a2021ed85927b78b776b (patch)
tree46eb14be3bb9f361d48188b886b1e98d4d32b519 /src/net/ea/inventoryhandler.cpp
parentddd4c187d5b11abe9f94f0d32cda0a43fe83eba9 (diff)
downloadplus-a3b7888017c387d14e33a2021ed85927b78b776b.tar.gz
plus-a3b7888017c387d14e33a2021ed85927b78b776b.tar.bz2
plus-a3b7888017c387d14e33a2021ed85927b78b776b.tar.xz
plus-a3b7888017c387d14e33a2021ed85927b78b776b.zip
Add variable for storage window.
Diffstat (limited to 'src/net/ea/inventoryhandler.cpp')
-rw-r--r--src/net/ea/inventoryhandler.cpp33
1 files changed, 16 insertions, 17 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