summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-05-01 19:06:50 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-05-01 19:06:50 +0000
commit893cde9e754b805f1e62c517740919c04d9490e0 (patch)
tree90d31107c2097378ad1a7512726f540a55e0b8cb
parent5956605838be4419f7982ff25437b73c4e6f700e (diff)
downloadmana-893cde9e754b805f1e62c517740919c04d9490e0.tar.gz
mana-893cde9e754b805f1e62c517740919c04d9490e0.tar.bz2
mana-893cde9e754b805f1e62c517740919c04d9490e0.tar.xz
mana-893cde9e754b805f1e62c517740919c04d9490e0.zip
this should update arrows counter when picking up
-rw-r--r--The Mana World.dev16
-rw-r--r--src/game.cpp10
-rw-r--r--src/gui/equipment.cpp5
-rw-r--r--src/gui/equipment.h2
4 files changed, 24 insertions, 9 deletions
diff --git a/The Mana World.dev b/The Mana World.dev
index 9b5e15ff..e33f177d 100644
--- a/The Mana World.dev
+++ b/The Mana World.dev
@@ -1,7 +1,7 @@
[Project]
FileName=The Mana World.dev
Name=tmw
-UnitCount=122
+UnitCount=124
Type=0
Ver=1
ObjFiles=
@@ -1268,9 +1268,9 @@ OverrideBuildCmd=0
BuildCmd=
[Unit123]
-FileName=src\resources\itemmanager.h
+FileName=src\gui\chatinput.h
CompileCpp=1
-Folder=resources
+Folder=gui
Compile=1
Link=1
Priority=1000
@@ -1287,3 +1287,13 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
+[Unit124]
+FileName=src\gui\chatinput.cpp
+CompileCpp=1
+Folder=gui
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
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;