summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-22 04:01:51 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-22 04:01:51 +0000
commitcc772f0b2d7475a148ecfb0ef539edadac2c2279 (patch)
tree57be9410a958a30f79aa393b4bf9a9a6be736e29 /src/map/battle.c
parent13126fd8573dbca5096014f4d007d0469ec24e28 (diff)
downloadhercules-cc772f0b2d7475a148ecfb0ef539edadac2c2279.tar.gz
hercules-cc772f0b2d7475a148ecfb0ef539edadac2c2279.tar.bz2
hercules-cc772f0b2d7475a148ecfb0ef539edadac2c2279.tar.xz
hercules-cc772f0b2d7475a148ecfb0ef539edadac2c2279.zip
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
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c6
1 files changed, 5 insertions, 1 deletions
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 &&