summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2004-11-13 16:47:56 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2004-11-13 16:47:56 +0000
commit795552b239069ad77d63b47fddc6b1ef435fb987 (patch)
tree7fd67c247c85135337ac84ffb0e22554711b901c
parent33c5262ed04f5a69b24618b8fe49b8e83904f373 (diff)
downloadmana-client-795552b239069ad77d63b47fddc6b1ef435fb987.tar.gz
mana-client-795552b239069ad77d63b47fddc6b1ef435fb987.tar.bz2
mana-client-795552b239069ad77d63b47fddc6b1ef435fb987.tar.xz
mana-client-795552b239069ad77d63b47fddc6b1ef435fb987.zip
Hair styles
-rw-r--r--The Mana World.dev2
-rw-r--r--src/game.cpp10
-rw-r--r--src/game.h3
-rw-r--r--src/graphic/graphic.cpp4
-rw-r--r--src/gui/shop.cpp5
5 files changed, 16 insertions, 8 deletions
diff --git a/The Mana World.dev b/The Mana World.dev
index 87d63d45..9d55dba7 100644
--- a/The Mana World.dev
+++ b/The Mana World.dev
@@ -33,7 +33,7 @@ CompilerSettings=0000001001001000001101
Major=0
Minor=0
Release=8
-Build=71
+Build=89
LanguageID=1033
CharsetID=1252
CompanyName=The Mana World Development Team
diff --git a/src/game.cpp b/src/game.cpp
index 8b14202b..9c1c8c82 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -733,10 +733,12 @@ void do_parse() {
break;
// Sell dialog
case 0x00c7:
- n_items = (len-4)/10;
- show_npc_dialog = 4;
- for(int k=0;k<n_items;k++)
- add_sell_item(RFIFOW(4+10*k), RFIFOL(4+10*k+2));
+ n_items = (len-4)/10;
+ if(n_items>0) {
+ show_npc_dialog = 4;
+ for(int k=0;k<n_items;k++)
+ add_sell_item(RFIFOW(4+10*k), RFIFOL(4+10*k+2));
+ } else chatlog.chat_log("Nothing to sell", BY_SERVER, gui_font);
break;
// Answer to buy
case 0x00ca:
diff --git a/src/game.h b/src/game.h
index 1a455a1f..b4ec5a50 100644
--- a/src/game.h
+++ b/src/game.h
@@ -75,7 +75,8 @@ extern DIALOG stats_dialog[];
extern int fps, frame, current_npc;
extern char walk_status;
extern unsigned short src_x, src_y, x, y;
-extern volatile int tick_time, server_tick;
+extern volatile int tick_time;
+extern int server_tick;
void game();
void do_init();
diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp
index bbac9532..42b6856e 100644
--- a/src/graphic/graphic.cpp
+++ b/src/graphic/graphic.cpp
@@ -423,7 +423,11 @@ void do_graphic(void) {
}
break;
case 4:
+ //alert("","","","","",0,0);
+ //char ds[20];
sell_dialog[3].d1 = get_item_quantity(sell_dialog[4].d1);
+ //sprintf(ds, "%i", sell_dialog[3].d1);
+ //ok(ds,"");
/*if(sell_dialog[3].d2>sell_dialog[3].d1) {
sell_dialog[3].d2 = sell_dialog[3].d1;
sprintf((char *)sell_dialog[5].dp, "%i %i", sell_dialog[3].d1, sell_dialog[3].d2);
diff --git a/src/gui/shop.cpp b/src/gui/shop.cpp
index e929f434..5413e472 100644
--- a/src/gui/shop.cpp
+++ b/src/gui/shop.cpp
@@ -30,7 +30,7 @@ char* selectedItem = "You got 4";
ITEM_SHOP *shop = NULL;
char *item_db[] = {
- "Candy", "Medical Herb", "Chocolate", "Royal Jam", "Faerie Walnut",
+ "Cactus Drink", "Cactus potion", "Casino coins", "Royal Jam", "Faerie Walnut",
"Cup of wishes", "Magic rope", "Midge mallet", "Flammie drum", "Moogle belt"
};
@@ -118,7 +118,8 @@ int get_item_quantity(int index) {
item_shop = item_shop->next;
iterator++;
}
- return item_shop->quantity;
+ if(item_shop)return item_shop->quantity;
+ else return 0;
}
int get_item_index(int index) {