From 9258422d0dc8cdb5171aea5b36a6ae83346e52db Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 24 Dec 2013 17:32:06 -0200 Subject: Follow up cf19b26d50ac96111e44c33a80afd1f1ea935cec Fixed selllist on zeny trader. Special Thanks to Thunderbolt, bleachftl and Frost Signed-off-by: shennetsind --- src/map/npc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/map') diff --git a/src/map/npc.c b/src/map/npc.c index 44df2fe7a..dc29f04aa 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1483,8 +1483,8 @@ bool npc_trader_open(struct map_session_data *sd, struct npc_data *nd) { switch( nd->u.scr.shop->type ) { case NST_ZENY: sd->state.callshop = 1; - npc->buysellsel(sd,nd->bl.id,0); - break; + clif->npcbuysell(sd,nd->bl.id); + return true;/* we skip sd->npc_shopid, npc->buysell will set it then when the player selects */ case NST_MARKET: { unsigned short i; @@ -2002,10 +2002,16 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) nullpo_retr(1, sd); nullpo_retr(1, item_list); - if( ( nd = npc->checknear(sd, map->id2bl(sd->npc_shopid)) ) == NULL || nd->subtype != SHOP ) { + if( ( nd = npc->checknear(sd, map->id2bl(sd->npc_shopid)) ) == NULL ) { return 1; } + if( nd->subtype != SHOP ) { + if( !(nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type == NST_ZENY) ) + return 1; + } + + z = 0; // verify the sell list -- cgit v1.2.3-60-g2f50