diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-10-25 09:38:33 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-10-25 09:38:33 +0000 |
commit | 7da9ee0b5c0aad9425441bcddeeadb745aa4c0d5 (patch) | |
tree | 7207e15b81b7816156384b8f040ee5dda17de86a /src/map/unit.c | |
parent | 9b4d9f29a8ab56f59cbac2cccbb685146f52faac (diff) | |
download | hercules-7da9ee0b5c0aad9425441bcddeeadb745aa4c0d5.tar.gz hercules-7da9ee0b5c0aad9425441bcddeeadb745aa4c0d5.tar.bz2 hercules-7da9ee0b5c0aad9425441bcddeeadb745aa4c0d5.tar.xz hercules-7da9ee0b5c0aad9425441bcddeeadb745aa4c0d5.zip |
* Implemented the official version of 'OnTouch' named as 'OnTouch_'.(it can be defined in script_athena.conf)
* Adapted 'map_foreachinarea' to 'map_forsomeinarea' so that it allows you to specify the number of bl you wanna operate on.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14097 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 0ba48b32b..c75600180 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -171,6 +171,10 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr data) return 0; } else sd->areanpc_id=0; + + if( sd->ontouch.npc_id ) + npc_touchnext_areanpc(sd,false); + if (sd->state.gmaster_flag && (battle_config.guild_aura&((agit_flag || agit2_flag)?2:1)) && (battle_config.guild_aura&(map_flag_gvg2(bl->m)?8:4)) @@ -520,6 +524,10 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool return 0; } else sd->areanpc_id=0; + + if( sd->ontouch.npc_id ) + npc_touchnext_areanpc(sd,false); + if( sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 0 ) { // Check if pet needs to be teleported. [Skotlex] int flag = 0; @@ -1804,6 +1812,8 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l guild_reply_reqalliance(sd,sd->guild_alliance_account,0); if(sd->menuskill_id) sd->menuskill_id = sd->menuskill_val = 0; + if( sd->ontouch.npc_id ) + npc_touchnext_areanpc(sd,true); sd->npc_shopid = 0; sd->adopt_invite = 0; |