summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-24 03:40:07 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-24 03:40:07 +0000
commit740ae24edcbf817163b32827fcf1ac9ca3a84965 (patch)
tree58ca3d1421d7e41dbc1d959434ea19bc5366f848 /src/map/battle.c
parentd45ade4f3228c8ea6d1bfecebdeb6686699980bd (diff)
downloadhercules-740ae24edcbf817163b32827fcf1ac9ca3a84965.tar.gz
hercules-740ae24edcbf817163b32827fcf1ac9ca3a84965.tar.bz2
hercules-740ae24edcbf817163b32827fcf1ac9ca3a84965.tar.xz
hercules-740ae24edcbf817163b32827fcf1ac9ca3a84965.zip
Follow up r16486 a little code optimization and fixed its server crashing/halting tendency.
Follow up r16483 fixed a duplicate display animation of traps when triggered by a skill. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16487 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 74db9f7c6..aff678365 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2091,19 +2091,16 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
RE_LVL_DMOD(100);
break;
case RK_HUNDREDSPEAR:
- skillratio += 500 + (80 * skill_lv) + (50 * pc_checkskill(sd,LK_SPIRALPIERCE));
+ skillratio += 500 + (80 * skill_lv);
if( sd )
{
short index = sd->equip_index[EQI_HAND_R];
- if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON )
- {
- short spearwbd = 1000 - sd->inventory_data[index]->weight / 10;// Spear Weight Bonus Damage.
- if ( spearwbd < 0 )
- spearwbd = 0;// If weight of weapon is more then 1000, bonus is set to 0 to prevent negative value. [Rytech]
- skillratio += spearwbd;
- }
- }
- RE_LVL_DMOD(100);
+ if( index >= 0 && sd->inventory_data[index]
+ && sd->inventory_data[index]->type == IT_WEAPON )
+ skillratio += max(10000 - sd->inventory_data[index]->weight, 0);
+ skillratio += 50 * pc_checkskill(sd,LK_SPIRALPIERCE);
+ } // (1 + [(Caster’s Base Level - 100) / 200])
+ skillratio = skillratio * (100 + (status_get_lv(src)-100) / 2) / 100;
break;
case RK_WINDCUTTER:
skillratio += 50 * skill_lv;