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 6b717290c8..268de03686 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 @@ -13910,13 +13910,20 @@ public final class L2PcInstance extends L2Playable public void addFactionPoints(Faction faction, int count) { final int currentPoints = getFactionPoints(faction); + final int oldLevel = getFactionLevel(faction); if ((currentPoints + count) < faction.getPointsOfLevel(faction.getLevelCount() - 1)) { getVariables().set(faction.toString(), currentPoints + count); + sendMessage("You obtained " + count + " Faction Points for " + faction.toString().toLowerCase().replace("_", " ") + "."); } else { getVariables().set(faction.toString(), faction.getPointsOfLevel(faction.getLevelCount() - 1)); + + } + if (oldLevel < getFactionLevel(faction)) + { + sendMessage("The Faction Level of " + faction.toString().toLowerCase().replace("_", " ") + " has increased. Open the Factions window to check."); } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/events/AbstractScript.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/events/AbstractScript.java index 072ea5e2da..64b9ccdcb0 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/events/AbstractScript.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/events/AbstractScript.java @@ -2999,26 +2999,11 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime * Add faction points as quest reward. * @param player the player whom to reward with the faction points. * @param faction the faction to which the points belong - * @param factionPoints the base amount of faction points to give to the player. It will be influenced by RATE_QUEST_REWARD_FP. + * @param points the base amount of faction points to give to the player. It is influenced by RATE_QUEST_REWARD_FP. */ - public static void addFactionPoints(L2PcInstance player, Faction faction, int factionPoints) + public static void addFactionPoints(L2PcInstance player, Faction faction, int points) { - factionPoints *= Config.RATE_QUEST_REWARD_FP; - final int currentPoints = player.getFactionPoints(faction); - final int oldLevel = player.getFactionLevel(faction); - - if ((currentPoints + factionPoints) < faction.getPointsOfLevel(faction.getLevelCount() - 1)) - { - player.sendPacket(new ExShowScreenMessage("Your reputation with the " + faction.toString().toLowerCase().replace("_", " ") + " faction was increased by " + factionPoints + " points.", 5000)); - } - - player.addFactionPoints(faction, factionPoints); - final int newLevel = player.getFactionLevel(faction); - - if (oldLevel < newLevel) - { - player.sendPacket(new ExShowScreenMessage("Your reputation level with the " + faction.toString().toLowerCase().replace("_", " ") + " faction has increased.", 5000)); - } + player.addFactionPoints(faction, (int) (points * Config.RATE_QUEST_REWARD_FP)); } /**