From 8a05e611a71168cccac282777aa1719a46f574d0 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 1 Feb 2014 17:33:34 -0200 Subject: MvP dmotion fix Effect would not be applied when mvp is under no status conditions, also adjusted spelling in secure.h Signed-off-by: shennetsind --- src/config/secure.h | 2 +- src/map/status.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/config/secure.h b/src/config/secure.h index 5742ae30b..e5e3662d1 100644 --- a/src/config/secure.h +++ b/src/config/secure.h @@ -50,7 +50,7 @@ /** * Uncomment to disable * while enabled, movement of invisible (cloaking, hide, etca [not chase walk]) units is not informed to nearby foes, - * rendering any client-side cheat, that would otherwise make these units visible, to + * rendering any client-side cheat, that would otherwise make these units visible, to not function. * - "Why is this a setting?" because theres a cost, while enabled if a hidden character uses a skill with cast time, * - for example "cloaking -> walk a bit -> soul break another player" the character display will be momentarily abrupted * - on the action of unhiding (its a quick effect, ~0.007s in duration), and due to the nature of the skill cast on the client diff --git a/src/map/status.c b/src/map/status.c index 74b2571e1..6cc3269e5 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -5529,12 +5529,14 @@ short status_calc_aspd_rate(struct block_list *bl, struct status_change *sc, int } unsigned short status_calc_dmotion(struct block_list *bl, struct status_change *sc, int dmotion) { + // It has been confirmed on official servers that MvP mobs have no dmotion even without endure + if( bl->type == BL_MOB && (((TBL_MOB*)bl)->status.mode&MD_BOSS) ) + return 0; + if( !sc || !sc->count || map_flag_gvg2(bl->m) || map->list[bl->m].flag.battleground ) return cap_value(dmotion,0,USHRT_MAX); - /** - * It has been confirmed on official servers that MvP mobs have no dmotion even without endure - **/ - if( sc->data[SC_ENDURE] || ( bl->type == BL_MOB && (((TBL_MOB*)bl)->status.mode&MD_BOSS) ) ) + + if( sc->data[SC_ENDURE] ) return 0; if( sc->data[SC_RUN] || sc->data[SC_WUGDASH] ) return 0; -- cgit v1.2.3-70-g09d2