summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-04-28 09:10:04 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-04-28 09:10:04 +0000
commit75176f384099d90c1624df3c7878192ffd070663 (patch)
tree57e12e0eed7493d7b98ac860b279e95d7f16384a /src/map/npc.c
parented2d4742d0f572cf0393ee6667a88035c4e2d01e (diff)
downloadhercules-75176f384099d90c1624df3c7878192ffd070663.tar.gz
hercules-75176f384099d90c1624df3c7878192ffd070663.tar.bz2
hercules-75176f384099d90c1624df3c7878192ffd070663.tar.xz
hercules-75176f384099d90c1624df3c7878192ffd070663.zip
Fixed OnTouch doesn't trigger on hiding characters. (bugreport:4208)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14291 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c7
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);