Addition of SkillBonusRange effect handler.
Contributed by nasseka.
This commit is contained in:
@@ -227,7 +227,7 @@ public class CreatureStat
|
||||
{
|
||||
if (skill != null)
|
||||
{
|
||||
return (int) getValue(Stat.MAGIC_ATTACK_RANGE, skill.getCastRange());
|
||||
return skill.getCastRange() + (int) getValue(Stat.MAGIC_ATTACK_RANGE, 0);
|
||||
}
|
||||
return _creature.getTemplate().getBaseAttackRange();
|
||||
}
|
||||
|
@@ -66,6 +66,7 @@ import org.l2jmobius.gameserver.model.options.OptionsSkillHolder;
|
||||
import org.l2jmobius.gameserver.model.options.OptionsSkillType;
|
||||
import org.l2jmobius.gameserver.model.skill.targets.TargetType;
|
||||
import org.l2jmobius.gameserver.model.stats.Formulas;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
@@ -175,7 +176,7 @@ public class SkillCaster implements Runnable
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((skill.getCastRange() > 0) && !Util.checkIfInRange(skill.getCastRange(), caster, target, false))
|
||||
if ((skill.getCastRange() > 0) && !Util.checkIfInRange(skill.getCastRange() + (int) caster.getStat().getValue(Stat.MAGIC_ATTACK_RANGE, 0), caster, target, false))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user