diff options
author | epoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-14 00:37:17 +0000 |
---|---|---|
committer | epoque11 <epoque11@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-14 00:37:17 +0000 |
commit | 95c1abdfcb62211557fdd14b463a014e87882a2d (patch) | |
tree | a407fac6b379af03606e55f8f4a2fb9eec814b58 /src/map/npc.c | |
parent | 4c5e3668433a0a6d63c0777f451f270f06e57fb7 (diff) | |
download | hercules-95c1abdfcb62211557fdd14b463a014e87882a2d.tar.gz hercules-95c1abdfcb62211557fdd14b463a014e87882a2d.tar.bz2 hercules-95c1abdfcb62211557fdd14b463a014e87882a2d.tar.xz hercules-95c1abdfcb62211557fdd14b463a014e87882a2d.zip |
- Fixed floating shops being accessible from any location through 3rd party programs
- TODO: needs amending for the walking glitch (bugreport:5016)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15099 54d463be-8e91-2dee-dedb-b68131a5f0ec
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 { |