From 42d215998c792de8a164fb1ed16168f0503f8f75 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 6 Jan 2020 22:57:59 +0000 Subject: [PATCH] Addition of EXP and SP multipliers by class. --- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- .../dist/game/config/Custom/ClassBalance.ini | 3 ++ .../java/org/l2jmobius/Config.java | 30 +++++++++++++++++++ .../org/l2jmobius/gameserver/model/Party.java | 3 ++ .../gameserver/model/actor/Attackable.java | 4 +-- 60 files changed, 570 insertions(+), 30 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_1.0_Ertheia/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java index 2505b44fb9..1f49ce4c3f 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/Config.java @@ -1140,6 +1140,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -3040,6 +3042,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Attackable.java index 5097c0ea60..6bb30e6458 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -504,8 +504,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_2.5_Underground/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java index bf87783eb6..c188bb9c96 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/Config.java @@ -1147,6 +1147,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -3057,6 +3059,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Attackable.java index aa609d8ac6..bb3a6277d5 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -497,8 +497,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_3.0_Helios/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java index 10ab29ecbd..a7f29be24f 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/Config.java @@ -1160,6 +1160,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -3081,6 +3083,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Attackable.java index aa609d8ac6..bb3a6277d5 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -497,8 +497,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java index fda9083c5c..8032c626c2 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/Config.java @@ -1147,6 +1147,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -3055,6 +3057,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Attackable.java index aa609d8ac6..bb3a6277d5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -497,8 +497,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_5.0_Salvation/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java index 7e0ade40f8..596ae5d174 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/Config.java @@ -1142,6 +1142,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -3057,6 +3059,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Party.java index 3571f1c346..d14365fe74 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/Party.java @@ -892,6 +892,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Attackable.java index f3f863081b..ce9e02432e 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -496,8 +496,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java index 7e0ade40f8..596ae5d174 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/Config.java @@ -1142,6 +1142,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -3057,6 +3059,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Party.java index 3571f1c346..d14365fe74 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/Party.java @@ -892,6 +892,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Attackable.java index f3f863081b..ce9e02432e 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -496,8 +496,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_6.0_Fafurion/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java index 42fe4ba5a1..8423b53d58 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/Config.java @@ -1164,6 +1164,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -3100,6 +3102,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Party.java index 3571f1c346..d14365fe74 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/Party.java @@ -892,6 +892,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Attackable.java index f3f863081b..ce9e02432e 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -496,8 +496,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java index b5749becfd..89e7e1f0cf 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java @@ -1165,6 +1165,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -3102,6 +3104,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/Party.java index c6514f8c06..c24ff516e2 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/Party.java @@ -900,6 +900,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Attackable.java index 28eb92158c..7ebe8c2799 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -496,8 +496,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java index d3448a95be..97b2ab5ec6 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/Config.java @@ -1083,6 +1083,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -2917,6 +2919,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Attackable.java index aeb0433887..359c2d57a6 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -497,8 +497,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java index e234f62489..9cc7e24ae0 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/Config.java @@ -1087,6 +1087,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -2924,6 +2926,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Attackable.java index aeb0433887..359c2d57a6 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -497,8 +497,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java index e234f62489..9cc7e24ae0 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/Config.java @@ -1087,6 +1087,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -2924,6 +2926,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Attackable.java index aeb0433887..359c2d57a6 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -497,8 +497,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java index e234f62489..9cc7e24ae0 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/Config.java @@ -1087,6 +1087,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -2924,6 +2926,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Attackable.java index bb7c9dc6b7..479b213481 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -499,8 +499,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java index c1c25bce5e..c10f41b710 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/Config.java @@ -1092,6 +1092,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -2932,6 +2934,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Attackable.java index bb7c9dc6b7..479b213481 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -499,8 +499,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java index a07e1dd7bf..e3b77db06d 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/Config.java @@ -1091,6 +1091,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -2930,6 +2932,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Attackable.java index bb7c9dc6b7..479b213481 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -499,8 +499,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0) diff --git a/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/ClassBalance.ini b/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/ClassBalance.ini index 1667bb50aa..88f54bfde5 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/ClassBalance.ini +++ b/L2J_Mobius_Classic_Interlude/dist/game/config/Custom/ClassBalance.ini @@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers = PlayerHealingSkillMultipliers = SkillMasteryChanceMultipliers = + +ExpAmountMultipliers = +SpAmountMultipliers = diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java index 868044d83f..ab8e173d46 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/Config.java @@ -1094,6 +1094,8 @@ public class Config public static Map PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); + public static Map SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>(); public static boolean MULTILANG_ENABLE; public static List MULTILANG_ALLOWED = new ArrayList<>(); public static String MULTILANG_DEFAULT; @@ -2936,6 +2938,34 @@ public class Config } } } + final String[] expAmountMultipliers = ClassBalance.getString("ExpAmountMultipliers", "").trim().split(";"); + EXP_AMOUNT_MULTIPLIERS.clear(); + if (expAmountMultipliers.length > 0) + { + for (String info : expAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + EXP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } + final String[] spAmountMultipliers = ClassBalance.getString("SpAmountMultipliers", "").trim().split(";"); + SP_AMOUNT_MULTIPLIERS.clear(); + if (spAmountMultipliers.length > 0) + { + for (String info : spAmountMultipliers) + { + final String[] classInfo = info.trim().split("[*]"); + if (classInfo.length == 2) + { + final String id = classInfo[0].trim(); + SP_AMOUNT_MULTIPLIERS.put(Util.isDigit(id) ? ClassId.getClassId(Integer.parseInt(id)) : Enum.valueOf(ClassId.class, id), Float.parseFloat(classInfo[1].trim())); + } + } + } // Load CommunityBoard config file (if exists) final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/Party.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/Party.java index 7aff2e988a..b21958b1ea 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/Party.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/Party.java @@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) { + addExp *= Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + addSp *= Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(player.getClassId(), 1f); + double xp = addExp; double sp = addSp; if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java index aeb0433887..359c2d57a6 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/actor/Attackable.java @@ -497,8 +497,8 @@ public class Attackable extends Npc // Distribute the Exp and SP between the PlayerInstance and its Summon if (!attacker.isDead()) { - exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); - sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); + exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); + sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f); attacker.addExpAndSp(exp, sp, useVitalityRate()); if (exp > 0)