diff options
author | shennetsind <ind@henn.et> | 2013-06-14 08:56:59 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-14 08:56:59 -0300 |
commit | 35dcafcc79892075bfbd5087b44116c6328cc533 (patch) | |
tree | e3f0384980e03ef7baa41ea91dddf4ed4a701962 /src/map/battle.c | |
parent | 5a942993dd12ae7d85b1633a58b0dc23f85832c2 (diff) | |
parent | 074b15c84bf9b624eee18ba31587d08d0a94ed49 (diff) | |
download | hercules-35dcafcc79892075bfbd5087b44116c6328cc533.tar.gz hercules-35dcafcc79892075bfbd5087b44116c6328cc533.tar.bz2 hercules-35dcafcc79892075bfbd5087b44116c6328cc533.tar.xz hercules-35dcafcc79892075bfbd5087b44116c6328cc533.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 1fa35116e..31fe502f6 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; @@ -5134,10 +5141,10 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int rdelay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); } } - } - if( sc->data[SC_SHIELDSPELL_DEF] && sc->data[SC_SHIELDSPELL_DEF]->val1 == 2 && !is_boss(src) ){ - NORMALIZE_RDAMAGE(damage * sc->data[SC_SHIELDSPELL_DEF]->val2 / 100); - rdelay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); + if( sc->data[SC_SHIELDSPELL_DEF] && sc->data[SC_SHIELDSPELL_DEF]->val1 == 2 && !is_boss(src) ){ + NORMALIZE_RDAMAGE(damage * sc->data[SC_SHIELDSPELL_DEF]->val2 / 100); + rdelay = clif->damage(src, src, iTimer->gettick(), status_get_amotion(src), status_get_dmotion(src), rdamage, 1, 4, 0); + } } } else { if (sd && sd->bonus.long_weapon_damage_return){ |