summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-08-01 22:05:46 -0600
committerJared Adams <jaxad0127@gmail.com>2010-08-01 22:45:31 -0600
commitcec8045dcdad05d76141d4e27c8c9e72696ce7dc (patch)
tree0c7cded281b0ff01b2f0f0d74f44fc88e2622533 /src/gui/inventorywindow.cpp
parenta3e61c0e830c46b51c0d135962ad361c02b93243 (diff)
downloadmana-client-cec8045dcdad05d76141d4e27c8c9e72696ce7dc.tar.gz
mana-client-cec8045dcdad05d76141d4e27c8c9e72696ce7dc.tar.bz2
mana-client-cec8045dcdad05d76141d4e27c8c9e72696ce7dc.tar.xz
mana-client-cec8045dcdad05d76141d4e27c8c9e72696ce7dc.zip
Remove isActive methods from NPC dialogs and InventoryWindow
Uses counts in PlayerInfo instead. Reviewed-by: Chuck Miller
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index fb7d1c8c..3bb84ab8 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -140,13 +140,19 @@ InventoryWindow::InventoryWindow(Inventory *inventory):
slotsChanged(mInventory);
if (!isMainInventory())
+ {
setVisible(true);
+ PlayerInfo::setStorageCount(PlayerInfo::getStorageCount() + 1);
+ }
}
InventoryWindow::~InventoryWindow()
{
instances.remove(this);
mInventory->removeInventoyListener(this);
+
+ if (!isMainInventory())
+ PlayerInfo::setStorageCount(PlayerInfo::getStorageCount() - 1);
}
void InventoryWindow::action(const gcn::ActionEvent &event)
@@ -236,7 +242,7 @@ void InventoryWindow::mouseClicked(gcn::MouseEvent &event)
if (event.getButton() == gcn::MouseEvent::LEFT)
{
- if (isStorageActive() && keyboard.isKeyActive(keyboard.KEY_EMOTE))
+ if (instances.size() > 1 && keyboard.isKeyActive(keyboard.KEY_EMOTE))
{
Item *item = mItems->getSelectedItem();