diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2013-07-01 23:12:15 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2013-07-01 23:12:15 +0800 |
commit | b40fa517dc796f8067791eab85a23a9b714db2a8 (patch) | |
tree | b00171ae4a856f21d8e3e61812c1918ac55244ea /src | |
parent | 8f1bd982faf74fdb61126e97c75905976201cca5 (diff) | |
download | hercules-b40fa517dc796f8067791eab85a23a9b714db2a8.tar.gz hercules-b40fa517dc796f8067791eab85a23a9b714db2a8.tar.bz2 hercules-b40fa517dc796f8067791eab85a23a9b714db2a8.tar.xz hercules-b40fa517dc796f8067791eab85a23a9b714db2a8.zip |
Fixed Bug#7452
-where SC_SUB_WEAPONPROPERTY is now properly.
Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 6281cec34..6c06dd5fb 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -857,12 +857,12 @@ int battle_calc_elefix(struct block_list *src, struct block_list *target, uint16 #ifndef RENEWAL if( sc && sc->data[SC_SUB_WEAPONPROPERTY] ) { // Descriptions indicate this means adding a percent of a normal attack in another element. [Skotlex] - damage = battle->calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100; - damage += battle->attr_fix(src, target, damage, sc->data[SC_SUB_WEAPONPROPERTY]->val1, tstatus->def_ele, tstatus->ele_lv); - if( left ){ - damage = battle->calc_base_damage(sstatus, &sstatus->lhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100; - damage += battle->attr_fix(src, target, damage, sc->data[SC_SUB_WEAPONPROPERTY]->val1, tstatus->def_ele, tstatus->ele_lv); - } + int temp = battle->calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100; + damage += battle->attr_fix(src, target, temp, sc->data[SC_SUB_WEAPONPROPERTY]->val1, tstatus->def_ele, tstatus->ele_lv); + if( left ){ + temp = battle->calc_base_damage(sstatus, &sstatus->lhw, sc, tstatus->size, BL_CAST(BL_PC, src), (flag?2:0)) * sc->data[SC_SUB_WEAPONPROPERTY]->val2 / 100; + damage += battle->attr_fix(src, target, temp, sc->data[SC_SUB_WEAPONPROPERTY]->val1, tstatus->def_ele, tstatus->ele_lv); + } } #endif return damage; |