diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 3eb92dcf6..3a8ea376f 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1174,8 +1174,15 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type) } if (nd->sc.option&OPTION_INVISIBLE) // 無効化されている return 1; + if( nd->class_ < 0 && !sd->state.callshop ) + {// not called through a script and is not a visible NPC so an invalid call + return 1; + } + + // reset the callshop state for future calls + sd->state.callshop = 0; + sd->npc_shopid = id; - sd->npc_shopid=id; if (type==0) { clif_buylist(sd,nd); } else { |