summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-13 20:04:03 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-13 20:04:03 +0200
commit932ca64763d5133c4e5d8f6f6d7ed0d582d0456e (patch)
tree68de441cebab14f15514f5798504565529a773ff /src/net
parent3aba05585b85989b5d0927939812f612c3b0d4d9 (diff)
downloadplus-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.tar.gz
plus-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.tar.bz2
plus-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.tar.xz
plus-932ca64763d5133c4e5d8f6f6d7ed0d582d0456e.zip
Add arrows bar.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp11
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: