summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSimon Edwardsson <simon@crossnet.se>2004-10-02 17:37:28 +0000
committerSimon Edwardsson <simon@crossnet.se>2004-10-02 17:37:28 +0000
commitbbaf3dff1287cba348b047998a632fc000114c3d (patch)
tree6e360d0d0f034b51b5974bf9c00455f142cf9b3e /src/gui
parent022d432c3cbe83d41731c36ce8c735cea5ece4da (diff)
downloadmana-bbaf3dff1287cba348b047998a632fc000114c3d.tar.gz
mana-bbaf3dff1287cba348b047998a632fc000114c3d.tar.bz2
mana-bbaf3dff1287cba348b047998a632fc000114c3d.tar.xz
mana-bbaf3dff1287cba348b047998a632fc000114c3d.zip
Choose amunt in buy (npc shop).
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/shop.cpp10
-rw-r--r--src/gui/shop.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp
index 487465b6..7104c586 100644
--- a/src/gui/shop.cpp
+++ b/src/gui/shop.cpp
@@ -129,7 +129,15 @@ int get_item_index(int index) {
}
return item_shop->index;
}
-
+int get_item_price(int index) {
+ int iterator = 0;
+ ITEM_SHOP *item_shop = shop;
+ while(iterator<index) {
+ item_shop = item_shop->next;
+ iterator++;
+ }
+ return item_shop->price;
+}
void changeQ(void *dp3, int d2)
{
sprintf(itemCurrenyQ,"%i",d2);
diff --git a/src/gui/shop.h b/src/gui/shop.h
index 8c3869d0..fd4667e9 100644
--- a/src/gui/shop.h
+++ b/src/gui/shop.h
@@ -54,4 +54,6 @@ void close_shop();
short get_item_id(int index);
int get_item_quantity(int index);
int get_item_index(int index);
+int get_item_price(int index);
+
#endif