From 932ca64763d5133c4e5d8f6f6d7ed0d582d0456e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 Feb 2011 20:04:03 +0200 Subject: Add arrows bar. --- src/net/tmwa/inventoryhandler.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/net/tmwa/inventoryhandler.cpp') 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: -- cgit v1.2.3-70-g09d2