Addition of EXP and SP multipliers by class.

This commit is contained in:
MobiusDevelopment 2020-01-06 22:57:59 +00:00
parent b9882ce3eb
commit 42d215998c
60 changed files with 570 additions and 30 deletions

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1140,6 +1140,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -504,8 +504,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1147,6 +1147,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -497,8 +497,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1160,6 +1160,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -497,8 +497,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1147,6 +1147,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -497,8 +497,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1142,6 +1142,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -892,6 +892,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -496,8 +496,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1142,6 +1142,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -892,6 +892,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -496,8 +496,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1164,6 +1164,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -892,6 +892,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -496,8 +496,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1165,6 +1165,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -900,6 +900,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -496,8 +496,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1083,6 +1083,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -497,8 +497,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1087,6 +1087,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -497,8 +497,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1087,6 +1087,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -497,8 +497,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1087,6 +1087,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -499,8 +499,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1092,6 +1092,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -499,8 +499,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1091,6 +1091,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -499,8 +499,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)

View File

@ -49,3 +49,6 @@ PvpBlowSkillDefenceMultipliers =
PlayerHealingSkillMultipliers = PlayerHealingSkillMultipliers =
SkillMasteryChanceMultipliers = SkillMasteryChanceMultipliers =
ExpAmountMultipliers =
SpAmountMultipliers =

View File

@ -1094,6 +1094,8 @@ public class Config
public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PVP_BLOW_SKILL_DEFENCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> PLAYER_HEALING_SKILL_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>(); public static Map<ClassId, Float> SKILL_MASTERY_CHANCE_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> EXP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static Map<ClassId, Float> SP_AMOUNT_MULTIPLIERS = new ConcurrentHashMap<>();
public static boolean MULTILANG_ENABLE; public static boolean MULTILANG_ENABLE;
public static List<String> MULTILANG_ALLOWED = new ArrayList<>(); public static List<String> MULTILANG_ALLOWED = new ArrayList<>();
public static String MULTILANG_DEFAULT; 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) // Load CommunityBoard config file (if exists)
final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE); final PropertiesParser CommunityBoard = new PropertiesParser(CUSTOM_COMMUNITY_BOARD_CONFIG_FILE);

View File

@ -903,6 +903,9 @@ public class Party extends AbstractPlayerGroup
private double calculateExpSpPartyCutoff(PlayerInstance player, int topLvl, double addExp, double addSp, boolean vit) 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 xp = addExp;
double sp = addSp; double sp = addSp;
if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive")) if (Config.PARTY_XP_CUTOFF_METHOD.equalsIgnoreCase("highfive"))

View File

@ -497,8 +497,8 @@ public class Attackable extends Npc
// Distribute the Exp and SP between the PlayerInstance and its Summon // Distribute the Exp and SP between the PlayerInstance and its Summon
if (!attacker.isDead()) if (!attacker.isDead())
{ {
exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp); exp = attacker.getStat().getValue(Stats.EXPSP_RATE, exp) * Config.EXP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp); sp = attacker.getStat().getValue(Stats.EXPSP_RATE, sp) * Config.SP_AMOUNT_MULTIPLIERS.getOrDefault(attacker.getClassId(), 1f);
attacker.addExpAndSp(exp, sp, useVitalityRate()); attacker.addExpAndSp(exp, sp, useVitalityRate());
if (exp > 0) if (exp > 0)