summaryrefslogtreecommitdiff
path: root/src/game.cpp
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 /src/game.cpp
parent33c5262ed04f5a69b24618b8fe49b8e83904f373 (diff)
downloadmana-795552b239069ad77d63b47fddc6b1ef435fb987.tar.gz
mana-795552b239069ad77d63b47fddc6b1ef435fb987.tar.bz2
mana-795552b239069ad77d63b47fddc6b1ef435fb987.tar.xz
mana-795552b239069ad77d63b47fddc6b1ef435fb987.zip
Hair styles
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp10
1 files changed, 6 insertions, 4 deletions
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: