diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-13 20:04:03 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-13 20:04:03 +0200 |
commit | 932ca64763d5133c4e5d8f6f6d7ed0d582d0456e (patch) | |
tree | 68de441cebab14f15514f5798504565529a773ff /src/net/tmwa/inventoryhandler.cpp | |
parent | 3aba05585b85989b5d0927939812f612c3b0d4d9 (diff) | |
download | manaverse-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.tar.gz manaverse-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.tar.bz2 manaverse-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.tar.xz manaverse-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.zip |
Add arrows bar.
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index ad5ff4fff..7c6da139e 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -30,6 +30,8 @@ #include "localplayer.h" #include "log.h" +#include "gui/ministatus.h" + #include "gui/widgets/chattab.h" #include "net/messagein.h" @@ -311,6 +313,8 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) item->increaseQuantity(-amount); if (item->getQuantity() == 0) inventory->removeItemAt(index); + if (miniStatusWindow) + miniStatusWindow->updateArrows(); } } break; @@ -483,6 +487,9 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) if (flag) mEquips.setEquipment(getSlot(equipType), -1); + if (miniStatusWindow && equipType & 0x8000) + miniStatusWindow->updateArrows(); + break; case SMSG_PLAYER_ATTACK_RANGE: @@ -503,8 +510,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) index -= INVENTORY_OFFSET; - logger->log("Arrows equipped: %i", index); mEquips.setEquipment(Equipment::EQUIP_PROJECTILE_SLOT, index); + + if (miniStatusWindow) + miniStatusWindow->updateArrows(); break; default: |