diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-05-01 19:06:50 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-05-01 19:06:50 +0000 |
commit | 893cde9e754b805f1e62c517740919c04d9490e0 (patch) | |
tree | 90d31107c2097378ad1a7512726f540a55e0b8cb /src | |
parent | 5956605838be4419f7982ff25437b73c4e6f700e (diff) | |
download | mana-893cde9e754b805f1e62c517740919c04d9490e0.tar.gz mana-893cde9e754b805f1e62c517740919c04d9490e0.tar.bz2 mana-893cde9e754b805f1e62c517740919c04d9490e0.tar.xz mana-893cde9e754b805f1e62c517740919c04d9490e0.zip |
this should update arrows counter when picking up
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 10 | ||||
-rw-r--r-- | src/gui/equipment.cpp | 5 | ||||
-rw-r--r-- | src/gui/equipment.h | 2 |
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; |