diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-26 12:01:19 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-11-26 12:01:19 +0000 |
commit | 476222257ace810a1e69d552c969f36c4687f4d9 (patch) | |
tree | 4366787ac16e9f9d952b9cc1dee2c4e45d20e9f2 /src/map/skill.c | |
parent | 07dee1fd6c710b78fc826679966dbb6c0c1a8d44 (diff) | |
download | hercules-476222257ace810a1e69d552c969f36c4687f4d9.tar.gz hercules-476222257ace810a1e69d552c969f36c4687f4d9.tar.bz2 hercules-476222257ace810a1e69d552c969f36c4687f4d9.tar.xz hercules-476222257ace810a1e69d552c969f36c4687f4d9.zip |
* NPC event code cleanups.
- removed the 'OnMyMobDead' dead code. It's never supported though documented.
- removed the 'feature' that events only trigger when the player is in the OnTouch area IF it's specified.
It's never documented and breaks official scripts.
- some cleanups and bug fixes to OnTouch_.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14173 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 8d0b1cda9..e4fad5ff8 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1541,11 +1541,13 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in if( target->type == BL_PC ) { - if( map_getcell(target->m, target->x, target->y, CELL_CHKNPC) ) - npc_touch_areanpc((TBL_PC*)target, target->m, target->x, target->y); //Invoke area NPC - - if( ((TBL_PC*)target)->ontouch.npc_id ) - npc_touchnext_areanpc(((TBL_PC*)target),false); + TBL_PC *sd = (TBL_PC*)target; + if( sd->touching_id ) + npc_touchnext_areanpc(sd,false); + if( map_getcell(target->m,target->x,target->y,CELL_CHKNPC) ) + npc_touch_areanpc(sd,target->m,target->x,target->y); + else + sd->areanpc_id=0; } return count; //Return amount of knocked back cells. |