From 2b8e09dc6f730dcdae69ed0509a52de54016b640 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 25 Nov 2017 01:30:41 +0000 Subject: [PATCH] Fixed problem with SP reward calculation. --- .../java/com/l2jmobius/gameserver/model/actor/L2Npc.java | 8 ++++---- .../java/com/l2jmobius/gameserver/model/actor/L2Npc.java | 8 ++++---- .../java/com/l2jmobius/gameserver/model/actor/L2Npc.java | 8 ++++---- .../java/com/l2jmobius/gameserver/model/actor/L2Npc.java | 8 ++++---- .../java/com/l2jmobius/gameserver/model/actor/L2Npc.java | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index 44439e2b7e..314ddd1f47 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -853,21 +853,21 @@ public class L2Npc extends L2Character /** * @return the Exp Reward of this L2Npc (modified by RATE_XP). */ - public long getExpReward() + public double getExpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getExpRate() : Config.RATE_XP; - return (long) (getTemplate().getExp() * rateMul); + return getTemplate().getExp() * rateMul; } /** * @return the SP Reward of this L2Npc (modified by RATE_SP). */ - public int getSpReward() + public double getSpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getSPRate() : Config.RATE_SP; - return (int) (getTemplate().getSP() * rateMul); + return getTemplate().getSP() * rateMul; } /** diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index f2b3f03c92..5742c07807 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -852,21 +852,21 @@ public class L2Npc extends L2Character /** * @return the Exp Reward of this L2Npc (modified by RATE_XP). */ - public long getExpReward() + public double getExpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getExpRate() : Config.RATE_XP; - return (long) (getTemplate().getExp() * rateMul); + return getTemplate().getExp() * rateMul; } /** * @return the SP Reward of this L2Npc (modified by RATE_SP). */ - public int getSpReward() + public double getSpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getSPRate() : Config.RATE_SP; - return (int) (getTemplate().getSP() * rateMul); + return getTemplate().getSP() * rateMul; } /** diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index f2b3f03c92..5742c07807 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -852,21 +852,21 @@ public class L2Npc extends L2Character /** * @return the Exp Reward of this L2Npc (modified by RATE_XP). */ - public long getExpReward() + public double getExpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getExpRate() : Config.RATE_XP; - return (long) (getTemplate().getExp() * rateMul); + return getTemplate().getExp() * rateMul; } /** * @return the SP Reward of this L2Npc (modified by RATE_SP). */ - public int getSpReward() + public double getSpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getSPRate() : Config.RATE_SP; - return (int) (getTemplate().getSP() * rateMul); + return getTemplate().getSP() * rateMul; } /** diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index f2b3f03c92..5742c07807 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -852,21 +852,21 @@ public class L2Npc extends L2Character /** * @return the Exp Reward of this L2Npc (modified by RATE_XP). */ - public long getExpReward() + public double getExpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getExpRate() : Config.RATE_XP; - return (long) (getTemplate().getExp() * rateMul); + return getTemplate().getExp() * rateMul; } /** * @return the SP Reward of this L2Npc (modified by RATE_SP). */ - public int getSpReward() + public double getSpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getSPRate() : Config.RATE_SP; - return (int) (getTemplate().getSP() * rateMul); + return getTemplate().getSP() * rateMul; } /** diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Npc.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Npc.java index aa4830fcbe..dd3a438337 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Npc.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/L2Npc.java @@ -852,21 +852,21 @@ public class L2Npc extends L2Character /** * @return the Exp Reward of this L2Npc (modified by RATE_XP). */ - public long getExpReward() + public double getExpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getExpRate() : Config.RATE_XP; - return (long) (getTemplate().getExp() * rateMul); + return getTemplate().getExp() * rateMul; } /** * @return the SP Reward of this L2Npc (modified by RATE_SP). */ - public int getSpReward() + public double getSpReward() { final Instance instance = getInstanceWorld(); final float rateMul = instance != null ? instance.getSPRate() : Config.RATE_SP; - return (int) (getTemplate().getSP() * rateMul); + return getTemplate().getSP() * rateMul; } /**