summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-13 18:23:35 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-11-13 18:23:35 +0000
commit522160599f1de70a72ddd6d980a9fe3b6778402d (patch)
treec84cab8d5c7cb1ca2390a9a5026ddd250c953f3a /src
parent86f7f2e93049240a1386c86c25b816fc46edca8b (diff)
downloadhercules-522160599f1de70a72ddd6d980a9fe3b6778402d.tar.gz
hercules-522160599f1de70a72ddd6d980a9fe3b6778402d.tar.bz2
hercules-522160599f1de70a72ddd6d980a9fe3b6778402d.tar.xz
hercules-522160599f1de70a72ddd6d980a9fe3b6778402d.zip
- Fixed a typo in abra_db.txt (bugreport:4548)
- Fixed a weight check in Level 4 Weapon Quest. (bugreport:4533) - Removed a duplicate if() in battle.c, follow up to r14381. (bugreport:4549) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14461 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index b520b1d97..acd61b23f 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2860,20 +2860,17 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
int race2 = status_get_race2(src);
if (!(nk&NK_NO_ELEFIX))
{
- if (!(nk&NK_NO_ELEFIX))
+ int ele_fix = tsd->subele[s_ele];
+ for (i = 0; ARRAYLENGTH(tsd->subele2) > i && tsd->subele2[i].rate != 0; i++)
{
- int ele_fix = tsd->subele[s_ele];
- for (i = 0; ARRAYLENGTH(tsd->subele2) > i && tsd->subele2[i].rate != 0; i++)
- {
- if(tsd->subele2[i].ele != s_ele) continue;
- if(!(tsd->subele2[i].flag&md.flag&BF_WEAPONMASK &&
- tsd->subele2[i].flag&md.flag&BF_RANGEMASK &&
- tsd->subele2[i].flag&md.flag&BF_SKILLMASK))
- continue;
- ele_fix += tsd->subele2[i].rate;
- }
- cardfix=cardfix*(100-ele_fix)/100;
+ if(tsd->subele2[i].ele != s_ele) continue;
+ if(!(tsd->subele2[i].flag&md.flag&BF_WEAPONMASK &&
+ tsd->subele2[i].flag&md.flag&BF_RANGEMASK &&
+ tsd->subele2[i].flag&md.flag&BF_SKILLMASK))
+ continue;
+ ele_fix += tsd->subele2[i].rate;
}
+ cardfix=cardfix*(100-ele_fix)/100;
}
cardfix=cardfix*(100-tsd->subsize[sstatus->size])/100;
cardfix=cardfix*(100-tsd->subrace2[race2])/100;