Addition of WeaponAttackAngleBonus effect.

Contributed by nasseka.
This commit is contained in:
MobiusDevelopment
2022-02-02 06:34:51 +00:00
parent 33fa07355f
commit 2c3703a8a4
44 changed files with 404 additions and 12 deletions

View File

@@ -29,6 +29,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.network.serverpackets.ExNewSkillToLearnByLevelUp;
public class PlayableStat extends CreatureStat
@@ -252,6 +253,6 @@ 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());
}
}

View File

@@ -165,6 +165,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