Fixed low monster accuracy.
Contributed by jivec.
This commit is contained in:
@ -138,19 +138,19 @@ public class CharStat
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Accuracy (base+modifier) of the L2Character in function of the Weapon Expertise Penalty.
|
||||
* @return the Accuracy of the L2Character in function of the Weapon Expertise Penalty.
|
||||
*/
|
||||
public int getAccuracy()
|
||||
{
|
||||
return (int) Math.round(calcStat(Stats.ACCURACY_COMBAT, 0, null, null));
|
||||
return (int) Math.round(calcStat(Stats.ACCURACY_COMBAT, _activeChar.getTemplate().getBaseAccuracy(), _activeChar, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the Magic Accuracy (base+modifier) of the L2Character
|
||||
* @return the Magic Accuracy of the L2Character
|
||||
*/
|
||||
public int getMagicAccuracy()
|
||||
{
|
||||
return (int) Math.round(calcStat(Stats.ACCURACY_MAGIC, 0, null, null));
|
||||
return (int) Math.round(calcStat(Stats.ACCURACY_MAGIC, _activeChar.getTemplate().getBaseAccuracy(), _activeChar, null));
|
||||
}
|
||||
|
||||
public L2Character getActiveChar()
|
||||
|
@ -53,6 +53,7 @@ public class L2CharTemplate extends ListenersContainer
|
||||
private int _baseMAtk;
|
||||
private int _basePDef;
|
||||
private int _baseMDef;
|
||||
private double _basePAcc;
|
||||
private int _basePAtkSpd;
|
||||
private int _baseMAtkSpd;
|
||||
private int _baseAttackRange;
|
||||
@ -117,6 +118,7 @@ public class L2CharTemplate extends ListenersContainer
|
||||
_basePAtkSpd = set.getInt("basePAtkSpd", 300);
|
||||
_baseMAtkSpd = set.getInt("baseMAtkSpd", 333);
|
||||
_baseShldDef = set.getInt("baseShldDef", 0);
|
||||
_basePAcc = set.getDouble("accuracy", 0);
|
||||
_baseAttackRange = set.getInt("baseAtkRange", 40);
|
||||
_randomDamage = set.getInt("baseRndDam", 0);
|
||||
_baseAttackType = set.getEnum("baseAtkType", WeaponType.class, WeaponType.FIST);
|
||||
@ -156,6 +158,14 @@ public class L2CharTemplate extends ListenersContainer
|
||||
setBaseMoveSpeed(MoveType.SLOW_FLY, set.getDouble("baseFlyWalkSpd", getBaseMoveSpeed(MoveType.WALK)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return proper accuracy
|
||||
*/
|
||||
public double getBaseAccuracy()
|
||||
{
|
||||
return _basePAcc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the baseHpMax
|
||||
*/
|
||||
|
Reference in New Issue
Block a user