summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/npc.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 9e185f3f5..1ab5903ed 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2010/04/28
+ * Fixed OnTouch doesn't trigger on hiding character. (bugreport:4208) [Inkfish]
2010/04/23
* Merged a few updates for supporting renewal clients (thanks to Diablo): [Skotlex]
- Updated packets for char-select screen, trade item add, guild storage item add, vending list.
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);