summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp10
-rw-r--r--src/gui/equipment.cpp5
-rw-r--r--src/gui/equipment.h2
3 files changed, 11 insertions, 6 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 51a0a0c7..0f1f0bdb 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1233,12 +1233,10 @@ void do_parse()
inventoryWindow->addItem(RFIFOW(2), RFIFOW(6),
RFIFOW(4), false);
}
- /*char info[40];
- sprintf(info, "a0 %i %i %i %i %i %i %i %i",
- RFIFOW(2), RFIFOW(4), RFIFOW(6),
- RFIFOB(8), RFIFOB(9), RFIFOB(10),
- RFIFOW(19), RFIFOB(21));
- chatWindow->chat_log(info, BY_SERVER);*/
+ if (equipmentWindow->getArrows() == RFIFOW(6))
+ {
+ equipmentWindow->arrowsNumber += RFIFOW(4);
+ }
}
break;
// Decrease quantity of an item in inventory
diff --git a/src/gui/equipment.cpp b/src/gui/equipment.cpp
index e55b01b6..5393459f 100644
--- a/src/gui/equipment.cpp
+++ b/src/gui/equipment.cpp
@@ -108,3 +108,8 @@ void EquipmentWindow::setArrows(int id)
{
arrows = id;
}
+
+int EquipmentWindow::getArrows()
+{
+ return arrows;
+}
diff --git a/src/gui/equipment.h b/src/gui/equipment.h
index 60522b19..dbbcb6fa 100644
--- a/src/gui/equipment.h
+++ b/src/gui/equipment.h
@@ -70,6 +70,8 @@ class EquipmentWindow : public Window, gcn::ActionListener {
void setArrows(int id);
+ int getArrows();
+
EQUIPMENT_HOLDER equipments[10];
int arrowsNumber;