summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2009-08-18 16:49:39 -0400
committerMadCamel <madcamel@gmail.com>2009-08-18 16:49:39 -0400
commitf7059966bd6a06c3697e0d0721be6b4c08acce22 (patch)
treedf5646843b2b0492b1c16a7519bec9b451315c83 /src/map/npc.c
parentbe14846f81942b7965212d71446aa6ae91ee8dc7 (diff)
parente2f3dc61d7f2720f80d247354604b1ebdc15aad6 (diff)
downloadtmwa-f7059966bd6a06c3697e0d0721be6b4c08acce22.tar.gz
tmwa-f7059966bd6a06c3697e0d0721be6b4c08acce22.tar.bz2
tmwa-f7059966bd6a06c3697e0d0721be6b4c08acce22.tar.xz
tmwa-f7059966bd6a06c3697e0d0721be6b4c08acce22.zip
Merge branch 'master' of git://gitorious.org/tmw-eathena/mainline
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 5fe190b..a24a458 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -836,7 +836,10 @@ int npc_click(struct map_session_data *sd,int id)
break;
case MESSAGE:
if (nd->u.message)
+ {
clif_scriptmes(sd, id, nd->u.message);
+ clif_scriptclose(sd, id);
+ }
break;
}
@@ -941,7 +944,10 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
case ADDITEM_EXIST:
break;
case ADDITEM_NEW:
- new++;
+ if (itemdb_isequip)
+ new += item_list[i*2];
+ else
+ new++;
break;
case ADDITEM_OVERAMOUNT:
return 2;
@@ -949,6 +955,7 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
w+=itemdb_weight(item_list[i*2+1]) * item_list[i*2];
}
+
if (z > (double)sd->status.zeny)
return 1; // zeny�s��
if (w+sd->weight > sd->max_weight)