summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
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)