summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-10-24 10:45:36 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-10-24 10:45:36 +0000
commit9b4d9f29a8ab56f59cbac2cccbb685146f52faac (patch)
tree063297976fecaf11aa86f2b428ad1538f5010170
parentfc47bdd30c4d195c34277636cbeab1b77d88c350 (diff)
downloadhercules-9b4d9f29a8ab56f59cbac2cccbb685146f52faac.tar.gz
hercules-9b4d9f29a8ab56f59cbac2cccbb685146f52faac.tar.bz2
hercules-9b4d9f29a8ab56f59cbac2cccbb685146f52faac.tar.xz
hercules-9b4d9f29a8ab56f59cbac2cccbb685146f52faac.zip
Reverted the previous change to OnTouch not triggering for invisible chars.
While this is the official behavior for OnTouch (as opposed to OnTouch2 which we don't have), this change would break npcs that assume you can't just walk past them cloaked. If there is a real need for implementing this behavior in the future, it should be done in a backwards-compatible way if possible (although, inverting the meaning of OnTouch/OnTouch2 would cause a lot of confusion). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14096 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/npc.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 54437e012..39f55ea9e 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
09/10/24
+ * Reverted the previous change to OnTouch not triggering for invisible chars [ultramage]
* 'OnTouch' script shouldn't trigger when you are invisible.(same as warps) [Inkfish]
* Fixed character doesn't stop walking when walking into OnTouch area of an NPC who doesn't have an OnTouch label. [Inkfish]
09/10/18
diff --git a/src/map/npc.c b/src/map/npc.c
index 9447478f2..d87619382 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -776,9 +776,6 @@ int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y)
if(sd->npc_id)
return 1;
- if (sd->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK))
- return 0;
-
for(i=0;i<map[m].npc_num;i++)
{
if (map[m].npc[i]->sc.option&OPTION_INVISIBLE) {
@@ -810,6 +807,8 @@ int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y)
}
switch(map[m].npc[i]->subtype) {
case WARP:
+ if (sd->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK))
+ break; // hidden chars cannot use warps
pc_setpos(sd,map[m].npc[i]->u.warp.mapindex,map[m].npc[i]->u.warp.x,map[m].npc[i]->u.warp.y,0);
break;
case SCRIPT: