summaryrefslogtreecommitdiff
path: root/src/net/ea
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
parentddd4c187d5b11abe9f94f0d32cda0a43fe83eba9 (diff)
downloadmanaverse-a3b7888017c387d14e33a2021ed85927b78b776b.tar.gz
manaverse-a3b7888017c387d14e33a2021ed85927b78b776b.tar.bz2
manaverse-a3b7888017c387d14e33a2021ed85927b78b776b.tar.xz
manaverse-a3b7888017c387d14e33a2021ed85927b78b776b.zip
Add variable for storage window.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/inventoryhandler.cpp33
-rw-r--r--src/net/ea/inventoryhandler.h1
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;
};