Addition of WeaponAttackAngleBonus effect.
Contributed by nasseka.
This commit is contained in:
@@ -403,6 +403,7 @@ public class EffectMasterHandler
|
||||
EffectHandler.getInstance().registerHandler("VitalityExpRate", VitalityExpRate::new);
|
||||
EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new);
|
||||
EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new);
|
||||
EffectHandler.getInstance().registerHandler("WeaponAttackAngleBonus", WeaponAttackAngleBonus::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 NasSeKa
|
||||
*/
|
||||
public class WeaponAttackAngleBonus extends AbstractStatAddEffect
|
||||
{
|
||||
public WeaponAttackAngleBonus(StatSet params)
|
||||
{
|
||||
super(params, Stat.WEAPON_ATTACK_ANGLE_BONUS);
|
||||
}
|
||||
}
|
||||
@@ -369,6 +369,7 @@ VampiricDefence: Resist stat towards VampiricAttack
|
||||
VitalityExpRate: Sets the vitality exp rate. (l2jmobius)
|
||||
VitalityPointsRate: Vitality points consume rate.
|
||||
VitalityPointUp: Increases vitality points.
|
||||
WeaponAttackAngleBonus: Additional range for weapon attack angle. (l2jmobius)
|
||||
WeightLimit: Maximum weight stat.
|
||||
WeightPenalty: Weight penalty level stat.
|
||||
WorldChatPoints: Modify world chat points to use per day.
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayableExpChanged;
|
||||
import org.l2jmobius.gameserver.model.events.returns.TerminateReturn;
|
||||
import org.l2jmobius.gameserver.model.item.Weapon;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExNewSkillToLearnByLevelUp;
|
||||
@@ -268,7 +269,7 @@ public class PlayableStat extends CreatureStat
|
||||
public int getPhysicalAttackAngle()
|
||||
{
|
||||
final Weapon weapon = getActiveChar().getActiveWeaponItem();
|
||||
return weapon != null ? weapon.getBaseAttackAngle() : super.getPhysicalAttackAngle();
|
||||
return (weapon != null ? weapon.getBaseAttackAngle() + (int) getActiveChar().getStat().getValue(Stat.WEAPON_ATTACK_ANGLE_BONUS, 0) : super.getPhysicalAttackAngle());
|
||||
}
|
||||
|
||||
private void addReputationToClanBasedOnLevel(Player player, int leveledUpCount)
|
||||
|
||||
@@ -180,6 +180,7 @@ public enum Stat
|
||||
MAGIC_ATTACK_RANGE("mAtkRange"),
|
||||
ATTACK_COUNT_MAX("atkCountMax"),
|
||||
PHYSICAL_POLEARM_TARGET_SINGLE("polearmSingleTarget"),
|
||||
WEAPON_ATTACK_ANGLE_BONUS("weaponAttackAngleBonus"),
|
||||
HIT_AT_NIGHT("hitAtNight"),
|
||||
|
||||
// Run speed, walk & escape speed are calculated proportionally, magic speed is a buff
|
||||
|
||||
Reference in New Issue
Block a user