summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-30 20:29:09 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-30 20:29:09 +0300
commitf673fb7bdec273f594b6377384efb762a579f61c (patch)
tree9ba2923ab745c2b7aa3c44e859be84565f4d2d9a
parent800d18871b6a05a729c042e0a5ead2e4422c3622 (diff)
downloadevol-hercules-f673fb7bdec273f594b6377384efb762a579f61c.tar.gz
evol-hercules-f673fb7bdec273f594b6377384efb762a579f61c.tar.bz2
evol-hercules-f673fb7bdec273f594b6377384efb762a579f61c.tar.xz
evol-hercules-f673fb7bdec273f594b6377384efb762a579f61c.zip
Return for buy/sell request from client for custom shops, item list from cash shop.
-rw-r--r--src/emap/npc.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/emap/npc.c b/src/emap/npc.c
index e4c2427..0639269 100644
--- a/src/emap/npc.c
+++ b/src/emap/npc.c
@@ -94,12 +94,22 @@ int enpc_buysellsel_pre(TBL_PC **sdPtr,
return 1;
}
- if (*type == 0 && nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->type == NST_MARKET)
+ if (*type == 0 && nd->subtype == SCRIPT && nd->u.scr.shop)
{
- clif->npc_market_open(sd, nd);
- sd->npc_shopid = nd->bl.id;
- hookStop();
- return 0;
+ if (nd->u.scr.shop->type == NST_MARKET)
+ {
+ clif->npc_market_open(sd, nd);
+ sd->npc_shopid = nd->bl.id;
+ hookStop();
+ return 0;
+ }
+ else if (nd->u.scr.shop->type == NST_CUSTOM)
+ {
+ clif->cashshop_show(sd, nd);
+ sd->npc_shopid = nd->bl.id;
+ hookStop();
+ return 0;
+ }
}
if (nd->subtype != SHOP && !(nd->subtype == SCRIPT && nd->u.scr.shop && nd->u.scr.shop->items))