summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-06-14 01:59:38 -0700
committermalufett <malufett.eat.my.binaries@gmail.com>2013-06-14 01:59:38 -0700
commitd663d4d86a2a403764baa0de27af6f9950d9a09f (patch)
tree308d84ae13717b93daec98bc079b0d2209715d6f /src/map/battle.c
parentaf26debad8ef2d756e027fa9920ef0f68522d9c9 (diff)
downloadhercules-d663d4d86a2a403764baa0de27af6f9950d9a09f.tar.gz
hercules-d663d4d86a2a403764baa0de27af6f9950d9a09f.tar.bz2
hercules-d663d4d86a2a403764baa0de27af6f9950d9a09f.tar.xz
hercules-d663d4d86a2a403764baa0de27af6f9950d9a09f.zip
Fixed Bug#7362, Bug#7363 & Bug#7355
Fixed compilation error and server console error.
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 91733c945..f78e4f9a8 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1185,9 +1185,13 @@ int battle_calc_defense(int attack_type, struct block_list *src, struct block_li
**/
defType def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
short def2 = tstatus->def2, vit_def;
-
+#ifdef RENEWAL
def1 = status_calc_def2(target, tsc, def1, false); // equip def(RE)
def2 = status_calc_def(target, tsc, def2, false); // status def(RE)
+#else
+ def1 = status_calc_def(target, tsc, def1, false); // equip def(RE)
+ def2 = status_calc_def2(target, tsc, def2, false); // status def(RE)
+#endif
if( sd ){
i = sd->ignore_def[is_boss(target)?RC_BOSS:RC_NONBOSS];
@@ -1291,10 +1295,13 @@ int battle_calc_defense(int attack_type, struct block_list *src, struct block_li
{
defType mdef = tstatus->mdef;
short mdef2= tstatus->mdef2;
-
+#ifdef RENEWAL
mdef2 = status_calc_mdef(target, tsc, mdef2, false); // status mdef(RE)
mdef = status_calc_mdef2(target, tsc, mdef, false); // equip mde(RE)
-
+#else
+ mdef2 = status_calc_mdef2(target, tsc, mdef2, false); // status mdef(RE)
+ mdef = status_calc_mdef(target, tsc, mdef, false); // equip mde(RE)
+#endif
if( flag&1 )
mdef = 0;