From cc772f0b2d7475a148ecfb0ef539edadac2c2279 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 22 Mar 2012 04:01:51 +0000 Subject: Fixed bugreport:5357 Neutral Barrier is now working accordingly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15753 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 6 +++++- src/map/map.c | 16 ++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/map/battle.c b/src/map/battle.c index 0b6812277..34e651af8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -476,6 +476,11 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag if(sc->data[SC_TATAMIGAESHI] && (flag&(BF_MAGIC|BF_LONG)) == BF_LONG) return 0; + if( sc->data[SC_NEUTRALBARRIER] && (flag&(BF_MAGIC|BF_LONG)) == (BF_MAGIC|BF_LONG) ) { + d->dmg_lv = ATK_MISS; + return 0; + } + if((sce=sc->data[SC_KAUPE]) && rnd()%100 < sce->val2) { //Kaupe blocks damage (skill or otherwise) from players, mobs, homuns, mercenaries. clif_specialeffect(bl, 462, AREA); @@ -630,7 +635,6 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag return 0; } - //Probably not the most correct place, but it'll do here //(since battle_drain is strictly for players currently) if ((sce=sc->data[SC_BLOODLUST]) && flag&BF_WEAPON && damage > 0 && diff --git a/src/map/map.c b/src/map/map.c index 5a81733dc..efd3c16e0 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -416,14 +416,18 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) skill_unit_move(bl,tick,3); sc = status_get_sc(bl); if (sc && sc->count) { - if (sc->data[SC_CLOAKING]) - skill_check_cloaking(bl, sc->data[SC_CLOAKING]); if (sc->data[SC_DANCING]) skill_unit_move_unit_group(skill_id2group(sc->data[SC_DANCING]->val2), bl->m, x1-x0, y1-y0); - if (sc->data[SC_WARM]) - skill_unit_move_unit_group(skill_id2group(sc->data[SC_WARM]->val4), bl->m, x1-x0, y1-y0); - if (sc->data[SC_BANDING]) - skill_unit_move_unit_group(skill_id2group(sc->data[SC_BANDING]->val4), bl->m, x1-x0, y1-y0); + else { + if (sc->data[SC_CLOAKING]) + skill_check_cloaking(bl, sc->data[SC_CLOAKING]); + if (sc->data[SC_WARM]) + skill_unit_move_unit_group(skill_id2group(sc->data[SC_WARM]->val4), bl->m, x1-x0, y1-y0); + if (sc->data[SC_BANDING]) + skill_unit_move_unit_group(skill_id2group(sc->data[SC_BANDING]->val4), bl->m, x1-x0, y1-y0); + if (sc->data[SC_NEUTRALBARRIER_MASTER]) + skill_unit_move_unit_group(skill_id2group(sc->data[SC_NEUTRALBARRIER_MASTER]->val2), bl->m, x1-x0, y1-y0); + } /* Guild Aura Moving */ if( bl->type == BL_PC && ((TBL_PC*)bl)->state.gmaster_flag ) { if (sc->data[SC_LEADERSHIP]) -- cgit v1.2.3-70-g09d2