From d68700b564d67f64ed4f75ca5d812f51855c6656 Mon Sep 17 00:00:00 2001 From: ultramage Date: Sat, 25 Apr 2009 10:03:23 +0000 Subject: Added an int64 typecast to both the acid demonstration equation (which couldn't handle 1000-ish stats), and the misc damage reduction code (followup to r13694). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13700 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/battle.c') diff --git a/src/map/battle.c b/src/map/battle.c index 6f9228226..bf2119dc3 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2654,7 +2654,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * break; case CR_ACIDDEMONSTRATION: // updated the formula based on a Japanese formula found to be exact [Reddozen] if(tstatus->vit+sstatus->int_) //crash fix - md.damage = 7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_)); + md.damage = (int64)7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_)); else md.damage = 0; if (tsd) md.damage>>=1; @@ -2739,7 +2739,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * } if( md.damage && tsd && !(nk&NK_NO_CARDFIX_DEF) ) - { + {// misc damage reduction from equipment int cardfix = 10000; int race2 = status_get_race2(src); if (!(nk&NK_NO_ELEFIX)) @@ -2758,7 +2758,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * cardfix=cardfix*(100-tsd->long_attack_def_rate)/100; if (cardfix != 10000) - md.damage=md.damage*((double)cardfix/10000); + md.damage=(int64)md.damage*cardfix/10000; } if (sd && (i = pc_skillatk_bonus(sd, skill_num))) -- cgit v1.2.3-70-g09d2