Addition of SkillBonusRange effect handler.
Contributed by nasseka.
This commit is contained in:
		| @@ -327,6 +327,7 @@ public class EffectMasterHandler | ||||
| 		EffectHandler.getInstance().registerHandler("ShieldDefenceRate", ShieldDefenceRate::new); | ||||
| 		EffectHandler.getInstance().registerHandler("ShotsBonus", ShotsBonus::new); | ||||
| 		EffectHandler.getInstance().registerHandler("SilentMove", SilentMove::new); | ||||
| 		EffectHandler.getInstance().registerHandler("SkillBonusRange", SkillBonusRange::new); | ||||
| 		EffectHandler.getInstance().registerHandler("SkillCriticalDamage", SkillCriticalDamage::new); | ||||
| 		EffectHandler.getInstance().registerHandler("SkillEvasion", SkillEvasion::new); | ||||
| 		EffectHandler.getInstance().registerHandler("SkillMastery", SkillMastery::new); | ||||
|   | ||||
| @@ -0,0 +1,31 @@ | ||||
| /* | ||||
|  * This file is part of the L2J Mobius project. | ||||
|  *  | ||||
|  * This program is free software: you can redistribute it and/or modify | ||||
|  * it under the terms of the GNU General Public License as published by | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  *  | ||||
|  * This program is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
|  * General Public License for more details. | ||||
|  *  | ||||
|  * You should have received a copy of the GNU General Public License | ||||
|  * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
|  */ | ||||
| package handlers.effecthandlers; | ||||
|  | ||||
| import org.l2jmobius.gameserver.model.StatSet; | ||||
| import org.l2jmobius.gameserver.model.stats.Stat; | ||||
|  | ||||
| /** | ||||
|  * @author NasSeKa | ||||
|  */ | ||||
| public class SkillBonusRange extends AbstractStatAddEffect | ||||
| { | ||||
| 	public SkillBonusRange(StatSet params) | ||||
| 	{ | ||||
| 		super(params, Stat.MAGIC_ATTACK_RANGE); | ||||
| 	} | ||||
| } | ||||
| @@ -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(); | ||||
| 	} | ||||
|   | ||||
| @@ -67,6 +67,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; | ||||
| @@ -176,7 +177,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
	 MobiusDevelopment
					MobiusDevelopment