Sync with L2jServer HighFive Sep 8th 2015.

This commit is contained in:
MobiusDev
2015-09-08 19:52:45 +00:00
parent 4e2af7c19a
commit 40380c4860
738 changed files with 14444 additions and 13328 deletions

View File

@@ -25,7 +25,7 @@ import com.l2jserver.gameserver.model.conditions.Condition;
import com.l2jserver.gameserver.model.effects.AbstractEffect;
import com.l2jserver.gameserver.model.effects.L2EffectType;
import com.l2jserver.gameserver.model.skills.BuffInfo;
import com.l2jserver.gameserver.model.stats.BaseStats;
import com.l2jserver.gameserver.model.skills.Skill;
import com.l2jserver.gameserver.model.stats.Formulas;
import com.l2jserver.gameserver.model.stats.Stats;
import com.l2jserver.gameserver.network.SystemMessageId;
@@ -65,16 +65,17 @@ public final class PhysicalSoulAttack extends AbstractEffect
{
L2Character target = info.getEffected();
L2Character activeChar = info.getEffector();
Skill skill = info.getSkill();
if (activeChar.isAlikeDead())
{
return;
}
if (((info.getSkill().getFlyRadius() > 0) || (info.getSkill().getFlyType() != null)) && activeChar.isMovementDisabled())
if (((skill.getFlyRadius() > 0) || (skill.getFlyType() != null)) && activeChar.isMovementDisabled())
{
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_CANNOT_BE_USED_DUE_TO_UNSUITABLE_TERMS);
sm.addSkillName(info.getSkill());
sm.addSkillName(skill);
activeChar.sendPacket(sm);
return;
}
@@ -85,21 +86,21 @@ public final class PhysicalSoulAttack extends AbstractEffect
}
int damage = 0;
boolean ss = info.getSkill().isPhysical() && activeChar.isChargedShot(ShotType.SOULSHOTS);
final byte shld = Formulas.calcShldUse(activeChar, target, info.getSkill());
boolean ss = skill.isPhysical() && activeChar.isChargedShot(ShotType.SOULSHOTS);
final byte shld = Formulas.calcShldUse(activeChar, target, skill);
// Physical damage critical rate is only affected by STR.
boolean crit = false;
if (info.getSkill().getBaseCritRate() > 0)
if (skill.getBaseCritRate() > 0)
{
crit = Formulas.calcCrit(info.getSkill().getBaseCritRate() * 10 * BaseStats.STR.calcBonus(activeChar), true, target);
crit = Formulas.calcCrit(activeChar, target, skill);
}
damage = (int) Formulas.calcPhysDam(activeChar, target, info.getSkill(), shld, false, ss);
damage = (int) Formulas.calcPhysDam(activeChar, target, skill, shld, false, ss);
if ((info.getSkill().getMaxSoulConsumeCount() > 0) && activeChar.isPlayer())
if ((skill.getMaxSoulConsumeCount() > 0) && activeChar.isPlayer())
{
// Souls Formula (each soul increase +4%)
int chargedSouls = (activeChar.getActingPlayer().getChargedSouls() <= info.getSkill().getMaxSoulConsumeCount()) ? activeChar.getActingPlayer().getChargedSouls() : info.getSkill().getMaxSoulConsumeCount();
int chargedSouls = (activeChar.getActingPlayer().getChargedSouls() <= skill.getMaxSoulConsumeCount()) ? activeChar.getActingPlayer().getChargedSouls() : skill.getMaxSoulConsumeCount();
damage *= 1 + (chargedSouls * 0.04);
}
if (crit)
@@ -117,18 +118,18 @@ public final class PhysicalSoulAttack extends AbstractEffect
}
activeChar.sendDamageMessage(target, damage, false, crit, false);
target.reduceCurrentHp(damage, activeChar, info.getSkill());
target.notifyDamageReceived(damage, activeChar, info.getSkill(), crit, false);
target.reduceCurrentHp(damage, activeChar, skill);
target.notifyDamageReceived(damage, activeChar, skill, crit, false);
// Check if damage should be reflected
Formulas.calcDamageReflected(activeChar, target, info.getSkill(), crit);
Formulas.calcDamageReflected(activeChar, target, skill, crit);
}
else
{
activeChar.sendPacket(SystemMessageId.YOUR_ATTACK_HAS_FAILED);
}
if (info.getSkill().isSuicideAttack())
if (skill.isSuicideAttack())
{
activeChar.doDie(activeChar);
}