Sync with L2jServer HighFive Sep 8th 2015.
This commit is contained in:
@ -1242,7 +1242,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
shld1 = Formulas.calcShldUse(this, target);
|
||||
|
||||
// Calculate if hit is critical
|
||||
crit1 = Formulas.calcCrit(getStat().getCriticalHit(target, null), false, target);
|
||||
crit1 = Formulas.calcCrit(this, target);
|
||||
|
||||
// Calculate physical damages
|
||||
damage1 = (int) Formulas.calcPhysDam(this, target, null, shld1, crit1, attack.hasSoulshot());
|
||||
@ -1311,7 +1311,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
shld1 = Formulas.calcShldUse(this, target);
|
||||
|
||||
// Calculate if hit is critical
|
||||
crit1 = Formulas.calcCrit(getStat().getCriticalHit(target, null), false, target);
|
||||
crit1 = Formulas.calcCrit(this, target);
|
||||
|
||||
// Calculate physical damages
|
||||
damage1 = (int) Formulas.calcPhysDam(this, target, null, shld1, crit1, attack.hasSoulshot());
|
||||
@ -1377,7 +1377,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
shld1 = Formulas.calcShldUse(this, target);
|
||||
|
||||
// Calculate if hit 1 is critical
|
||||
crit1 = Formulas.calcCrit(getStat().getCriticalHit(target, null), false, target);
|
||||
crit1 = Formulas.calcCrit(this, target);
|
||||
|
||||
// Calculate physical damages of hit 1
|
||||
damage1 = (int) Formulas.calcPhysDam(this, target, null, shld1, crit1, attack.hasSoulshot());
|
||||
@ -1391,7 +1391,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
shld2 = Formulas.calcShldUse(this, target);
|
||||
|
||||
// Calculate if hit 2 is critical
|
||||
crit2 = Formulas.calcCrit(getStat().getCriticalHit(target, null), false, target);
|
||||
crit2 = Formulas.calcCrit(this, target);
|
||||
|
||||
// Calculate physical damages of hit 2
|
||||
damage2 = (int) Formulas.calcPhysDam(this, target, null, shld2, crit2, attack.hasSoulshot());
|
||||
@ -1567,7 +1567,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
shld1 = Formulas.calcShldUse(this, target);
|
||||
|
||||
// Calculate if hit is critical
|
||||
crit1 = Formulas.calcCrit(getStat().getCriticalHit(target, null), false, target);
|
||||
crit1 = Formulas.calcCrit(this, target);
|
||||
|
||||
// Calculate physical damages
|
||||
damage1 = (int) Formulas.calcPhysDam(this, target, null, shld1, crit1, attack.hasSoulshot());
|
||||
@ -6330,7 +6330,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
return getStat().getMaxRecoverableCp();
|
||||
}
|
||||
|
||||
public int getMAtk(L2Character target, Skill skill)
|
||||
public final double getMAtk(L2Character target, Skill skill)
|
||||
{
|
||||
return getStat().getMAtk(target, skill);
|
||||
}
|
||||
@ -6365,7 +6365,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
return getStat().getMCriticalHit(target, skill);
|
||||
}
|
||||
|
||||
public int getMDef(L2Character target, Skill skill)
|
||||
public final double getMDef(L2Character target, Skill skill)
|
||||
{
|
||||
return getStat().getMDef(target, skill);
|
||||
}
|
||||
@ -6375,7 +6375,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
return getStat().getMReuseRate(skill);
|
||||
}
|
||||
|
||||
public int getPAtk(L2Character target)
|
||||
public final double getPAtk(L2Character target)
|
||||
{
|
||||
return getStat().getPAtk(target);
|
||||
}
|
||||
@ -6385,7 +6385,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
return getStat().getPAtkSpd();
|
||||
}
|
||||
|
||||
public int getPDef(L2Character target)
|
||||
public final double getPDef(L2Character target)
|
||||
{
|
||||
return getStat().getPDef(target);
|
||||
}
|
||||
|
@ -842,7 +842,9 @@ public class L2PetInstance extends L2Summon
|
||||
dropItemHere(dropit, false);
|
||||
}
|
||||
|
||||
/** @return Returns the mount able. */
|
||||
/**
|
||||
* @return Returns the mount able.
|
||||
*/
|
||||
@Override
|
||||
public boolean isMountable()
|
||||
{
|
||||
@ -1220,18 +1222,6 @@ public class L2PetInstance extends L2Summon
|
||||
return getStat().getCriticalHit(target, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMAtk(L2Character target, Skill skill)
|
||||
{
|
||||
return getStat().getMAtk(target, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMDef(L2Character target, Skill skill)
|
||||
{
|
||||
return getStat().getMDef(target, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getSkillLevel(int skillId)
|
||||
{
|
||||
|
@ -191,7 +191,7 @@ public class CharStat
|
||||
*/
|
||||
public int getCriticalHit(L2Character target, Skill skill)
|
||||
{
|
||||
int val = (int) calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill);
|
||||
double val = (int) calcStat(Stats.CRITICAL_RATE, _activeChar.getTemplate().getBaseCritRate(), target, skill);
|
||||
|
||||
int maxCrit = (int) _activeChar.getStat().calcStat(Stats.MAX_PHYS_CRIT_RATE, 0, null, null);
|
||||
|
||||
@ -207,7 +207,16 @@ public class CharStat
|
||||
}
|
||||
}
|
||||
|
||||
return val;
|
||||
return (int) (val + .5);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param base
|
||||
* @return the Critical Hit Pos rate of the L2Character
|
||||
*/
|
||||
public int getCriticalHitPos(int base)
|
||||
{
|
||||
return (int) calcStat(Stats.CRITICAL_RATE_POS, base);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -329,7 +338,7 @@ public class CharStat
|
||||
* @param skill The L2Skill used against the target
|
||||
* @return
|
||||
*/
|
||||
public int getMAtk(L2Character target, Skill skill)
|
||||
public double getMAtk(L2Character target, Skill skill)
|
||||
{
|
||||
float bonusAtk = 1;
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
@ -342,7 +351,7 @@ public class CharStat
|
||||
}
|
||||
|
||||
// Calculate modifiers Magic Attack
|
||||
return (int) calcStat(Stats.MAGIC_ATTACK, _activeChar.getTemplate().getBaseMAtk() * bonusAtk, target, skill);
|
||||
return calcStat(Stats.MAGIC_ATTACK, _activeChar.getTemplate().getBaseMAtk() * bonusAtk, target, skill);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -389,7 +398,7 @@ public class CharStat
|
||||
* @param skill The L2Skill used against the target
|
||||
* @return the MDef (base+modifier) of the L2Character against a skill in function of abnormal effects in progress.
|
||||
*/
|
||||
public int getMDef(L2Character target, Skill skill)
|
||||
public double getMDef(L2Character target, Skill skill)
|
||||
{
|
||||
// Get the base MDef of the L2Character
|
||||
double defence = _activeChar.getTemplate().getBaseMDef();
|
||||
@ -401,7 +410,7 @@ public class CharStat
|
||||
}
|
||||
|
||||
// Calculate modifiers Magic Attack
|
||||
return (int) calcStat(Stats.MAGIC_DEFENCE, defence, target, skill);
|
||||
return calcStat(Stats.MAGIC_DEFENCE, defence, target, skill);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -526,7 +535,7 @@ public class CharStat
|
||||
* @param target
|
||||
* @return the PAtk (base+modifier) of the L2Character.
|
||||
*/
|
||||
public int getPAtk(L2Character target)
|
||||
public double getPAtk(L2Character target)
|
||||
{
|
||||
float bonusAtk = 1;
|
||||
if (Config.L2JMOD_CHAMPION_ENABLE && _activeChar.isChampion())
|
||||
@ -537,7 +546,7 @@ public class CharStat
|
||||
{
|
||||
bonusAtk *= Config.RAID_PATTACK_MULTIPLIER;
|
||||
}
|
||||
return (int) calcStat(Stats.POWER_ATTACK, _activeChar.getTemplate().getBasePAtk() * bonusAtk, target, null);
|
||||
return calcStat(Stats.POWER_ATTACK, _activeChar.getTemplate().getBasePAtk() * bonusAtk, target, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -558,9 +567,9 @@ public class CharStat
|
||||
* @param target
|
||||
* @return the PDef (base+modifier) of the L2Character.
|
||||
*/
|
||||
public int getPDef(L2Character target)
|
||||
public double getPDef(L2Character target)
|
||||
{
|
||||
return (int) calcStat(Stats.POWER_DEFENCE, (_activeChar.isRaid()) ? _activeChar.getTemplate().getBasePDef() * Config.RAID_PDEFENCE_MULTIPLIER : _activeChar.getTemplate().getBasePDef(), target, null);
|
||||
return calcStat(Stats.POWER_DEFENCE, (_activeChar.isRaid()) ? _activeChar.getTemplate().getBasePDef() * Config.RAID_PDEFENCE_MULTIPLIER : _activeChar.getTemplate().getBasePDef(), target, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -167,27 +167,27 @@ public class PetStat extends SummonStat
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMAtk(L2Character target, Skill skill)
|
||||
public double getMAtk(L2Character target, Skill skill)
|
||||
{
|
||||
return (int) calcStat(Stats.MAGIC_ATTACK, getActiveChar().getPetLevelData().getPetMAtk(), target, skill);
|
||||
return calcStat(Stats.MAGIC_ATTACK, getActiveChar().getPetLevelData().getPetMAtk(), target, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMDef(L2Character target, Skill skill)
|
||||
public double getMDef(L2Character target, Skill skill)
|
||||
{
|
||||
return (int) calcStat(Stats.MAGIC_DEFENCE, getActiveChar().getPetLevelData().getPetMDef(), target, skill);
|
||||
return calcStat(Stats.MAGIC_DEFENCE, getActiveChar().getPetLevelData().getPetMDef(), target, skill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPAtk(L2Character target)
|
||||
public double getPAtk(L2Character target)
|
||||
{
|
||||
return (int) calcStat(Stats.POWER_ATTACK, getActiveChar().getPetLevelData().getPetPAtk(), target, null);
|
||||
return calcStat(Stats.POWER_ATTACK, getActiveChar().getPetLevelData().getPetPAtk(), target, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPDef(L2Character target)
|
||||
public double getPDef(L2Character target)
|
||||
{
|
||||
return (int) calcStat(Stats.POWER_DEFENCE, getActiveChar().getPetLevelData().getPetPDef(), target, null);
|
||||
return calcStat(Stats.POWER_DEFENCE, getActiveChar().getPetLevelData().getPetPDef(), target, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user