diff options
author | Simon Edwardsson <simon@crossnet.se> | 2004-10-02 17:37:28 +0000 |
---|---|---|
committer | Simon Edwardsson <simon@crossnet.se> | 2004-10-02 17:37:28 +0000 |
commit | bbaf3dff1287cba348b047998a632fc000114c3d (patch) | |
tree | 6e360d0d0f034b51b5974bf9c00455f142cf9b3e /src/gui | |
parent | 022d432c3cbe83d41731c36ce8c735cea5ece4da (diff) | |
download | mana-client-bbaf3dff1287cba348b047998a632fc000114c3d.tar.gz mana-client-bbaf3dff1287cba348b047998a632fc000114c3d.tar.bz2 mana-client-bbaf3dff1287cba348b047998a632fc000114c3d.tar.xz mana-client-bbaf3dff1287cba348b047998a632fc000114c3d.zip |
Choose amunt in buy (npc shop).
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/shop.cpp | 10 | ||||
-rw-r--r-- | src/gui/shop.h | 2 |
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 |