Skip to content
Snippets Groups Projects
Commit 4dac2327 authored by Adry85's avatar Adry85 Committed by Zoey76
Browse files

Little improvement on calcPhysDam and calcSkillPhysDam formulas:

- Avoiding some variable declaration when target perform a shield
perfect block;
- Little fix on calcAttributeBonus formula.

DP part for:
https://bitbucket.org/l2jserver/l2j_server/commits/3a1c12740ba56ab48e314f736c1e3d31d31dd1b3
parent 4773ae2e
No related branches found
No related tags found
No related merge requests found
...@@ -108,7 +108,7 @@ public final class PhysicalAttack extends AbstractEffect ...@@ -108,7 +108,7 @@ public final class PhysicalAttack extends AbstractEffect
crit = Formulas.calcSkillCrit(activeChar, target, _criticalChance); crit = Formulas.calcSkillCrit(activeChar, target, _criticalChance);
} }
damage = Formulas.calcSkillPhysDam(activeChar, target, shield, false, ss, _power); damage = Formulas.calcSkillPhysDam(activeChar, target, skill, shield, false, ss, _power);
if (crit) if (crit)
{ {
......
...@@ -89,7 +89,7 @@ public final class PhysicalAttackHpLink extends AbstractEffect ...@@ -89,7 +89,7 @@ public final class PhysicalAttackHpLink extends AbstractEffect
double power = _power * (-((target.getCurrentHp() * 2) / target.getMaxHp()) + 2); double power = _power * (-((target.getCurrentHp() * 2) / target.getMaxHp()) + 2);
damage = Formulas.calcSkillPhysDam(activeChar, target, shld, false, ss, power); damage = Formulas.calcSkillPhysDam(activeChar, target, skill, shld, false, ss, power);
if (damage > 0) if (damage > 0)
{ {
......
...@@ -108,7 +108,7 @@ public final class PhysicalSoulAttack extends AbstractEffect ...@@ -108,7 +108,7 @@ public final class PhysicalSoulAttack extends AbstractEffect
crit = Formulas.calcSkillCrit(activeChar, target, _criticalChance); crit = Formulas.calcSkillCrit(activeChar, target, _criticalChance);
} }
damage = Formulas.calcSkillPhysDam(activeChar, target, shield, false, ss, _power); damage = Formulas.calcSkillPhysDam(activeChar, target, skill, shield, false, ss, _power);
if ((skill.getMaxSoulConsumeCount() > 0) && activeChar.isPlayer()) if ((skill.getMaxSoulConsumeCount() > 0) && activeChar.isPlayer())
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment