diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-08-01 22:05:46 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-08-01 22:45:31 -0600 |
commit | cec8045dcdad05d76141d4e27c8c9e72696ce7dc (patch) | |
tree | 0c7cded281b0ff01b2f0f0d74f44fc88e2622533 /src/gui/inventorywindow.cpp | |
parent | a3e61c0e830c46b51c0d135962ad361c02b93243 (diff) | |
download | Mana-cec8045dcdad05d76141d4e27c8c9e72696ce7dc.tar.gz Mana-cec8045dcdad05d76141d4e27c8c9e72696ce7dc.tar.bz2 Mana-cec8045dcdad05d76141d4e27c8c9e72696ce7dc.tar.xz Mana-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.cpp | 8 |
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(); |