summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);