diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/npc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 15434f357..aa9bfd228 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -107,8 +107,11 @@ int npc_ontouch_event(struct map_session_data *sd, struct npc_data *nd) { char name[NAME_LENGTH*2+3]; - if( nd->touching_id || pc_ishiding(sd) ) - return 0; + if( nd->touching_id ) + return 0; // Attached a player already. Can't trigger on anyone else. + + if( pc_ishiding(sd) ) + return 1; // Can't trigger 'OnTouch_'. try 'OnTouch' later. snprintf(name, ARRAYLENGTH(name), "%s::%s", nd->exname, script_config.ontouch_name); return npc_event(sd,name,1); |