diff options
author | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-09-08 21:56:44 +0200 |
---|---|---|
committer | Stefan Dombrowski <stefan@uni-bonn.de> | 2010-09-08 21:56:44 +0200 |
commit | 173cbf107b35fb191724e5386cf3bcf0106c80ae (patch) | |
tree | d37d120c77135230b4f7b16b648cd20027e56ecd /src/net/tmwa | |
parent | db2f9e4c7af87074f75af14a183db41e5ccdcc21 (diff) | |
download | mana-173cbf107b35fb191724e5386cf3bcf0106c80ae.tar.gz mana-173cbf107b35fb191724e5386cf3bcf0106c80ae.tar.bz2 mana-173cbf107b35fb191724e5386cf3bcf0106c80ae.tar.xz mana-173cbf107b35fb191724e5386cf3bcf0106c80ae.zip |
Adding missing updates for buttons in InventoryWindow
Reviewed-by: Thorbjorn
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 10 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index 7363c738..f5b379b9 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -245,6 +245,8 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) inventory->setItem(index, itemId, amount, equipType != 0); } + + inventoryWindow->updateButtons(); } break; case SMSG_PLAYER_INVENTORY_REMOVE: @@ -255,6 +257,7 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) item->increaseQuantity(-amount); if (item->getQuantity() == 0) inventory->removeItemAt(index); + inventoryWindow->updateButtons(); } break; @@ -266,7 +269,11 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) msg.readInt8(); // type if (Item *item = inventory->getItem(index)) + { item->setQuantity(amount); + inventoryWindow->updateButtons(); + } + break; case SMSG_ITEM_USE_RESPONSE: @@ -280,7 +287,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) else { if (Item *item = inventory->getItem(index)) + { item->setQuantity(amount); + inventoryWindow->updateButtons(); + } } break; diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h index 82738afe..0c4ad092 100644 --- a/src/net/tmwa/inventoryhandler.h +++ b/src/net/tmwa/inventoryhandler.h @@ -87,6 +87,8 @@ class EquipBackend : public Equipment::Backend { { item->setEquipped(true); } + + inventoryWindow->updateButtons(); } private: |