From c5909b0e34bd99edccdf5452b8173c0e6aefe6dc Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 13 Jun 2006 17:37:08 +0000 Subject: [PATCH] - Marionette and Devotion will now check raw distance and ignore obstacles and the like. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7134 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ src/map/status.c | 4 ++-- src/map/unit.c | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index fa09a7bce8..801cc4e5da 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ 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. 2006/06/13 + * Marionette and Devotion will now check raw distance and ignore obstacles + and the like. [Skotlex] * Added irc_channel_pass setting and prevent crashing when irc server lookup by host fails. Thanks to Trancid for the details. [Skotlex] * [Fixed]: diff --git a/src/map/status.c b/src/map/status.c index 9b9a8c0817..87457f2dd2 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -6023,7 +6023,7 @@ int status_change_timer(int tid, unsigned int tick, int id, int data) { //Check range and timeleft to preserve status [Skotlex] //This implementation won't work for mobs because of map_id2sd, but it's a small cost in exchange of the speed of map_id2sd over map_id2sd struct map_session_data *md = map_id2sd(sc->data[type].val1); - if (md && battle_check_range(bl, &md->bl, sc->data[type].val3) && (sc->data[type].val4-=1000)>0) + if (md && check_distance_bl(bl, &md->bl, sc->data[type].val3) && (sc->data[type].val4-=1000)>0) { sc->data[type].timer = add_timer(1000+tick, status_change_timer, bl->id, data); return 0; @@ -6073,7 +6073,7 @@ int status_change_timer(int tid, unsigned int tick, int id, int data) case SC_MARIONETTE2: { struct block_list *pbl = map_id2bl(sc->data[type].val1); - if (pbl && battle_check_range(bl, pbl, 7) && (sc->data[type].val2--)>0) + if (pbl && check_distance_bl(bl, pbl, 7) && (sc->data[type].val2--)>0) { sc->data[type].timer = add_timer( 1000 + tick, status_change_timer, diff --git a/src/map/unit.c b/src/map/unit.c index 966b07192f..e1b42c101e 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1482,6 +1482,10 @@ int unit_remove_map(struct block_list *bl, int clrtype) { skill_stop_dancing(bl); if (sc->data[SC_DEVOTION].timer!=-1) status_change_end(bl,SC_DEVOTION,-1); + if (sc->data[SC_MARIONETTE].timer!=-1) + status_change_end(bl,SC_MARIONETTE,-1); + if (sc->data[SC_MARIONETTE2].timer!=-1) + status_change_end(bl,SC_MARIONETTE2,-1); if (sc->data[SC_CLOSECONFINE].timer!=-1) status_change_end(bl,SC_CLOSECONFINE,-1); if (sc->data[SC_CLOSECONFINE2].timer!=-1)