Addition of WeaponBonusMAtk and WeaponBonusPAtk effect handlers.
Thanks to Sero, nassseka and Enryu.
This commit is contained in:
		| @@ -403,6 +403,8 @@ public class EffectMasterHandler | ||||
| 		EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new); | ||||
| 		EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new); | ||||
| 		EffectHandler.getInstance().registerHandler("WeaponAttackAngleBonus", WeaponAttackAngleBonus::new); | ||||
| 		EffectHandler.getInstance().registerHandler("WeaponBonusMAtk", WeaponBonusMAtk::new); | ||||
| 		EffectHandler.getInstance().registerHandler("WeaponBonusPAtk", WeaponBonusPAtk::new); | ||||
| 		EffectHandler.getInstance().registerHandler("WeightLimit", WeightLimit::new); | ||||
| 		EffectHandler.getInstance().registerHandler("WeightPenalty", WeightPenalty::new); | ||||
| 		EffectHandler.getInstance().registerHandler("WorldChatPoints", WorldChatPoints::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 Sero | ||||
|  */ | ||||
| public class WeaponBonusMAtk extends AbstractStatAddEffect | ||||
| { | ||||
| 	public WeaponBonusMAtk(StatSet params) | ||||
| 	{ | ||||
| 		super(params, Stat.WEAPON_BONUS_MAGIC_ATTACK); | ||||
| 	} | ||||
| } | ||||
| @@ -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 Sero | ||||
|  */ | ||||
| public class WeaponBonusPAtk extends AbstractStatAddEffect | ||||
| { | ||||
| 	public WeaponBonusPAtk(StatSet params) | ||||
| 	{ | ||||
| 		super(params, Stat.WEAPON_BONUS_PHYSICAL_ATTACK); | ||||
| 	} | ||||
| } | ||||
| @@ -369,6 +369,8 @@ VitalityExpRate: Sets the vitality exp rate. (l2jmobius) | ||||
| VitalityPointsRate: Vitality points consume rate. | ||||
| VitalityPointUp: Increases vitality points. | ||||
| WeaponAttackAngleBonus: Additional range for weapon attack angle. (l2jmobius) | ||||
| WeaponBonusMAtk: Additional MAtk for weapons. (l2jmobius) | ||||
| WeaponBonusPAtk: Additional PAtk for weapons. (l2jmobius) | ||||
| WeightLimit: Maximum weight stat. | ||||
| WeightPenalty: Weight penalty level stat. | ||||
| WorldChatPoints: Modify world chat points to use per day. | ||||
|   | ||||
| @@ -273,6 +273,11 @@ public class CreatureStat | ||||
| 		return (int) getValue(Stat.MAGIC_ATTACK); | ||||
| 	} | ||||
| 	 | ||||
| 	public int getWeaponBonusMAtk() | ||||
| 	{ | ||||
| 		return (int) getValue(Stat.WEAPON_BONUS_MAGIC_ATTACK); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * @return the MAtk Speed (base+modifier) of the Creature in function of the Armour Expertise Penalty. | ||||
| 	 */ | ||||
| @@ -372,6 +377,11 @@ public class CreatureStat | ||||
| 		return (int) getValue(Stat.PHYSICAL_ATTACK); | ||||
| 	} | ||||
| 	 | ||||
| 	public int getWeaponBonusPAtk() | ||||
| 	{ | ||||
| 		return (int) getValue(Stat.WEAPON_BONUS_PHYSICAL_ATTACK); | ||||
| 	} | ||||
| 	 | ||||
| 	/** | ||||
| 	 * @return the PAtk Speed (base+modifier) of the Creature in function of the Armour Expertise Penalty. | ||||
| 	 */ | ||||
|   | ||||
| @@ -79,6 +79,8 @@ public enum Stat | ||||
| 	MAGICAL_DEFENCE("mDef", new MDefenseFinalizer()), | ||||
| 	PHYSICAL_ATTACK("pAtk", new PAttackFinalizer()), | ||||
| 	MAGIC_ATTACK("mAtk", new MAttackFinalizer()), | ||||
| 	WEAPON_BONUS_PHYSICAL_ATTACK("weaponBonusPAtk"), | ||||
| 	WEAPON_BONUS_MAGIC_ATTACK("weaponBonusMAtk"), | ||||
| 	MAGIC_ATTACK_BY_PHYSICAL_ATTACK("mAtkByPAtk", Stat::defaultValue, MathUtil::add, MathUtil::mul, 0, 0), | ||||
| 	PHYSICAL_ATTACK_SPEED("pAtkSpd", new PAttackSpeedFinalizer()), | ||||
| 	MAGIC_ATTACK_SPEED("mAtkSpd", new MAttackSpeedFinalizer()), // Magic Skill Casting Time Rate | ||||
|   | ||||
| @@ -36,6 +36,7 @@ public class MAttackFinalizer implements IStatFunction | ||||
| 		throwIfPresent(base); | ||||
| 		 | ||||
| 		double baseValue = calcWeaponBaseValue(creature, stat); | ||||
| 		baseValue += creature.getStat().getWeaponBonusMAtk(); | ||||
| 		baseValue += calcEnchantedItemBonus(creature, stat); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
|   | ||||
| @@ -36,6 +36,7 @@ public class PAttackFinalizer implements IStatFunction | ||||
| 		throwIfPresent(base); | ||||
| 		 | ||||
| 		double baseValue = calcWeaponBaseValue(creature, stat); | ||||
| 		baseValue += creature.getStat().getWeaponBonusPAtk(); | ||||
| 		baseValue += calcEnchantedItemBonus(creature, stat); | ||||
| 		if (creature.isPlayer()) | ||||
| 		{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 MobiusDevelopment
					MobiusDevelopment