From 5e3383dbf43b03ff10dc6336051bb01473aa974f Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 4 May 2013 10:51:24 +0200 Subject: [PATCH] Account for skill and global experience modifiers --- src/main/java/com/gmail/nossr50/listeners/SelfListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java index c99ba7e8a..4905e7110 100644 --- a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java @@ -50,7 +50,8 @@ public class SelfListener implements Listener { return; } - float difference = (mcMMOPlayer.getProfile().getRegisteredXpGain(skillType) - threshold) / threshold; + float modifiedThreshold = (float) (threshold / skillType.getXpModifier() * Config.getInstance().getExperienceGainsGlobalMultiplier()); + float difference = (mcMMOPlayer.getProfile().getRegisteredXpGain(skillType) - modifiedThreshold) / modifiedThreshold; if (difference > 0) { // System.out.println("Total XP Earned: " + mcMMOPlayer.getProfile().getRegisteredXpGain(skillType) + " / Threshold value: " + threshold);