diff --git a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/skills/Formulas.java b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/skills/Formulas.java index 0485b1aeb7..aeb35c8029 100644 --- a/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/skills/Formulas.java +++ b/L2J_Mobius_C4_ScionsOfDestiny/java/org/l2jmobius/gameserver/model/skills/Formulas.java @@ -707,7 +707,7 @@ public class Formulas public void calc(Env env) { final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate(); - final int lvl = env.player.getLevel() - t.getClassBaseLevel(); + final int lvl = Math.max(env.player.getLevel() - t.getClassBaseLevel(), -50); final double hpmod = t.getLevelHpMod() * lvl; final double hpmax = (t.getLevelHpAdd() + hpmod) * lvl; final double hpmin = (t.getLevelHpAdd() * lvl) + hpmod; @@ -754,7 +754,7 @@ public class Formulas public void calc(Env env) { final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate(); - final int lvl = env.player.getLevel() - t.getClassBaseLevel(); + final int lvl = Math.max(env.player.getLevel() - t.getClassBaseLevel(), -50); final double cpmod = t.getLevelCpMod() * lvl; final double cpmax = (t.getLevelCpAdd() + cpmod) * lvl; final double cpmin = (t.getLevelCpAdd() * lvl) + cpmod; @@ -801,7 +801,7 @@ public class Formulas public void calc(Env env) { final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate(); - final int lvl = env.player.getLevel() - t.getClassBaseLevel(); + final int lvl = Math.max(env.player.getLevel() - t.getClassBaseLevel(), -50); final double mpmod = t.getLevelMpMod() * lvl; final double mpmax = (t.getLevelMpAdd() + mpmod) * lvl; final double mpmin = (t.getLevelMpAdd() * lvl) + mpmod; diff --git a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/skills/Formulas.java b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/skills/Formulas.java index 0485b1aeb7..aeb35c8029 100644 --- a/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/skills/Formulas.java +++ b/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/model/skills/Formulas.java @@ -707,7 +707,7 @@ public class Formulas public void calc(Env env) { final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate(); - final int lvl = env.player.getLevel() - t.getClassBaseLevel(); + final int lvl = Math.max(env.player.getLevel() - t.getClassBaseLevel(), -50); final double hpmod = t.getLevelHpMod() * lvl; final double hpmax = (t.getLevelHpAdd() + hpmod) * lvl; final double hpmin = (t.getLevelHpAdd() * lvl) + hpmod; @@ -754,7 +754,7 @@ public class Formulas public void calc(Env env) { final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate(); - final int lvl = env.player.getLevel() - t.getClassBaseLevel(); + final int lvl = Math.max(env.player.getLevel() - t.getClassBaseLevel(), -50); final double cpmod = t.getLevelCpMod() * lvl; final double cpmax = (t.getLevelCpAdd() + cpmod) * lvl; final double cpmin = (t.getLevelCpAdd() * lvl) + cpmod; @@ -801,7 +801,7 @@ public class Formulas public void calc(Env env) { final PlayerTemplate t = (PlayerTemplate) env.player.getTemplate(); - final int lvl = env.player.getLevel() - t.getClassBaseLevel(); + final int lvl = Math.max(env.player.getLevel() - t.getClassBaseLevel(), -50); final double mpmod = t.getLevelMpMod() * lvl; final double mpmax = (t.getLevelMpAdd() + mpmod) * lvl; final double mpmin = (t.getLevelMpAdd() * lvl) + mpmod;