diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-22 16:46:09 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-03-22 16:46:09 +0000 |
commit | fad0a74cd53f827e4c006b497b658baca2065a3d (patch) | |
tree | fd896b3f74145cf3b2f43077b96fadb3f49ae514 /src/map/battle.c | |
parent | 782af771684f613e20111bd498ccd1b885978551 (diff) | |
download | hercules-fad0a74cd53f827e4c006b497b658baca2065a3d.tar.gz hercules-fad0a74cd53f827e4c006b497b658baca2065a3d.tar.bz2 hercules-fad0a74cd53f827e4c006b497b658baca2065a3d.tar.xz hercules-fad0a74cd53f827e4c006b497b658baca2065a3d.zip |
- Removed unused bIgnoreDefMob
- Removed unneeded sd variables cart_max_weight and cart_max_num
- Made ignore_mdef_ele/ignore_mdef_race/ignore_def_ele/ignore_def_race unsigned chars rather than ints.
- Made pc_dropitem check for inventory_data, to guarantee that the item will be deleted from the inventory after dropping it.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10051 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 133b7eed7..a6dfba50b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1375,8 +1375,8 @@ static struct Damage battle_calc_weapon_attack( break; case MC_CARTREVOLUTION: skillratio += 50; - if(sd && sd->cart_max_weight > 0 && sd->cart_weight > 0) - skillratio += 100*sd->cart_weight/sd->cart_max_weight; // +1% every 1% weight + if(sd && sd->cart_weight) + skillratio += 100*sd->cart_weight/battle_config.max_cart_weight; // +1% every 1% weight else if (!sd) skillratio += 150; //Max damage for non players. break; @@ -1499,8 +1499,8 @@ static struct Damage battle_calc_weapon_attack( i = 10 * (16 - skill_lv); if (i < 1) i = 1; //Preserve damage ratio when max cart weight is changed. - if(sd && sd->cart_weight && sd->cart_max_weight) - skillratio += sd->cart_weight/i * 80000/sd->cart_max_weight - 100; + if(sd && sd->cart_weight) + skillratio += sd->cart_weight/i * 80000/battle_config.max_cart_weight - 100; else if (!sd) skillratio += 80000 / i - 100; break; @@ -1669,7 +1669,6 @@ static struct Damage battle_calc_weapon_attack( if (skill_num != CR_GRANDCROSS && skill_num != NPC_GRANDDARKNESS) { //Ignore Defense? if (!flag.idef && ( - (target->type == BL_MOB && sd->right_weapon.ignore_def_mob & (is_boss(target)?2:1)) || sd->right_weapon.ignore_def_ele & (1<<tstatus->def_ele) || sd->right_weapon.ignore_def_race & (1<<tstatus->race) || sd->right_weapon.ignore_def_race & (is_boss(target)?1<<RC_BOSS:1<<RC_NONBOSS) @@ -1677,7 +1676,6 @@ static struct Damage battle_calc_weapon_attack( flag.idef = 1; if (!flag.idef2 && ( - (target->type == BL_MOB && sd->left_weapon.ignore_def_mob & (is_boss(target)?2:1)) || sd->left_weapon.ignore_def_ele & (1<<tstatus->def_ele) || sd->left_weapon.ignore_def_race & (1<<tstatus->race) || sd->left_weapon.ignore_def_race & (is_boss(target)?1<<RC_BOSS:1<<RC_NONBOSS) |