Vampiric effect improvement.
Contributed by Sdw-.
This commit is contained in:
@@ -27,13 +27,13 @@ import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
*/
|
||||
public class VampiricAttack extends AbstractEffect
|
||||
{
|
||||
private final int _amount;
|
||||
private final int _sum;
|
||||
private final double _amount;
|
||||
private final double _sum;
|
||||
|
||||
public VampiricAttack(StatsSet params)
|
||||
{
|
||||
_amount = params.getInt("amount", 0);
|
||||
_sum = _amount * params.getInt("chance", 0);
|
||||
_amount = params.getDouble("amount");
|
||||
_sum = _amount * params.getDouble("chance");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -63,7 +63,7 @@ public class CharStat
|
||||
private final int[] _traitsInvul = new int[TraitType.values().length];
|
||||
/** Creature's maximum buff count. */
|
||||
private int _maxBuffCount = Config.BUFFS_MAX_AMOUNT;
|
||||
private int _vampiricSum = 0;
|
||||
private double _vampiricSum = 0;
|
||||
|
||||
private final Map<Stats, Double> _statsAdd = new EnumMap<>(Stats.class);
|
||||
private final Map<Stats, Double> _statsMul = new EnumMap<>(Stats.class);
|
||||
@@ -870,12 +870,12 @@ public class CharStat
|
||||
});
|
||||
}
|
||||
|
||||
public void addToVampiricSum(int sum)
|
||||
public void addToVampiricSum(double sum)
|
||||
{
|
||||
_vampiricSum += sum;
|
||||
}
|
||||
|
||||
public int getVampiricSum()
|
||||
public double getVampiricSum()
|
||||
{
|
||||
_lock.readLock().lock();
|
||||
try
|
||||
|
Reference in New Issue
Block a user