From 1a9b53b8f1890c004e2660e8f82ad3ac705a8fb9 Mon Sep 17 00:00:00 2001 From: Dennis Friis Date: Thu, 8 May 2008 11:02:20 +0000 Subject: When buying from NPC do not stack unstackable items. It might seem like a better place to fix it in pc_additem, but this method should be allowed to or breakage may occur. --- src/map/npc.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/map/npc.c b/src/map/npc.c index 7175504..84f0695 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -990,14 +990,28 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list) return 4; // cant buy while trading pc_payzeny(sd,(int)z); + for(i=0;inameid; + item_tmp.identify = 1; // npc”Ì”„ƒAƒCƒeƒ€‚ÍŠÓ’èÏ‚Ý - pc_additem(sd,&item_tmp,item_list[i*2]); + if (amount > 1 && (item_data->type == 4 || item_data->type == 5 || item_data->type == 7 || item_data->type == 8)) + { + for (j=0; j