From d4b301a5a61001a3179cdfe4b1a0a338c520d3ad Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 18 Sep 2017 17:04:20 +0000 Subject: [PATCH] Improved previous commit. --- .../gameserver/model/actor/instance/L2PcInstance.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java index 5531d74ce2..b123a730fa 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/instance/L2PcInstance.java @@ -14011,20 +14011,19 @@ public final class L2PcInstance extends L2Playable public void addFactionPoints(Faction faction, int count) { final int currentPoints = getVariables().getInt(faction.toString(), 0); + final String message; if ((currentPoints + count) > faction.getPointsOfLevel(faction.getLevelCount() - 1)) { getVariables().set(faction.toString(), faction.getPointsOfLevel(faction.getLevelCount() - 1)); - final String message = "Your reputation with the " + faction.toString().toLowerCase().replace("_", " ") + " faction is at the highest level possible."; - sendPacket(new ExShowScreenMessage(message, 5000)); - sendMessage(message); + message = "Your reputation with the " + faction.toString().toLowerCase().replace("_", " ") + " faction is at the highest level possible."; } else { getVariables().set(faction.toString(), currentPoints + count); - final String message = "Your reputation with the " + faction.toString().toLowerCase().replace("_", " ") + " faction was increased by " + count + " points."; - sendPacket(new ExShowScreenMessage(message, 5000)); - sendMessage(message); + message = "Your reputation with the " + faction.toString().toLowerCase().replace("_", " ") + " faction was increased by " + count + " points."; } + sendPacket(new ExShowScreenMessage(message, 5000)); + sendMessage(message); } @Override