diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-12-26 19:18:45 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-12-26 19:18:45 +0000 |
commit | 372ad56db38ded14454f093e4edba7ec98d48254 (patch) | |
tree | 7f340b36495615100d2dd86e0fa25b96c5da0199 /src/gui/shop.cpp | |
parent | 251031b790ebc5cd677315174d4e46bc4e287718 (diff) | |
download | mana-372ad56db38ded14454f093e4edba7ec98d48254.tar.gz mana-372ad56db38ded14454f093e4edba7ec98d48254.tar.bz2 mana-372ad56db38ded14454f093e4edba7ec98d48254.tar.xz mana-372ad56db38ded14454f093e4edba7ec98d48254.zip |
Some more Xmas fixes
Diffstat (limited to 'src/gui/shop.cpp')
-rw-r--r-- | src/gui/shop.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp index 0220ad67..acf5eda9 100644 --- a/src/gui/shop.cpp +++ b/src/gui/shop.cpp @@ -22,6 +22,7 @@ */ #include "shop.h" +#include "../graphic/graphic.h" int n_items; char* selectedItem = "You got 4"; @@ -69,8 +70,8 @@ void add_buy_item(short id, int price) { void add_sell_item(short index, int price) { int id = inventory.items[index].id; ITEM_SHOP *item_shop = (ITEM_SHOP *)malloc(sizeof(ITEM_SHOP)); - if(id-501>=0 && id-501<=2) - sprintf(item_shop->name, "%s %i gp", item_db[id-501], price); + if(id>=501 && id<=511) + sprintf(item_shop->name, "%s %i gp", item_db[id-501], price); else sprintf(item_shop->name, "Unknown item %i gp", price); item_shop->price = price; |