summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-07-01 23:12:15 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-07-01 23:12:15 +0800
commitb40fa517dc796f8067791eab85a23a9b714db2a8 (patch)
treeb00171ae4a856f21d8e3e61812c1918ac55244ea /src/map/battle.c
parent8f1bd982faf74fdb61126e97c75905976201cca5 (diff)
downloadhercules-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/map/battle.c')
-rw-r--r--src/map/battle.c12
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;