diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index 7be781b5..5b770865 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -936,7 +936,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc * checks if they could potentially upgrade to one of these * * @return If the player can change its current class to - * a subclass + * a subclass */ public boolean canChooseSubclass() { for (Subclass subclass : getProfess().getSubclasses()) diff --git a/src/main/java/net/Indyuce/mmocore/experience/droptable/ExperienceItem.java b/src/main/java/net/Indyuce/mmocore/experience/droptable/ExperienceItem.java index 1504c000..768dd678 100644 --- a/src/main/java/net/Indyuce/mmocore/experience/droptable/ExperienceItem.java +++ b/src/main/java/net/Indyuce/mmocore/experience/droptable/ExperienceItem.java @@ -5,6 +5,7 @@ import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.quest.trigger.Trigger; import net.Indyuce.mmocore.api.player.PlayerData; import org.apache.commons.lang.Validate; +import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import java.util.ArrayList; @@ -50,7 +51,7 @@ public class ExperienceItem { Validate.isTrue(config.contains("triggers")); id = config.getName(); - period = config.getInt("period", 0); + period = config.getInt("period", 1); firstTrigger = config.getInt("first-trigger", period); claimChance = config.getDouble("chance", 100) / 100; failReduction = config.getDouble("fail-reduction", 80) / 100; @@ -71,7 +72,7 @@ public class ExperienceItem { * account the randomness factor from the 'chance' parameter */ public boolean roll(int professionLevel, int timesCollected) { - int claimsRequired = professionLevel + 1 - (firstTrigger - timesCollected * period); + int claimsRequired = (professionLevel + 1 - (firstTrigger + (timesCollected) * period)); if (claimsRequired < 1) return false; diff --git a/src/main/java/net/Indyuce/mmocore/experience/droptable/ExperienceTable.java b/src/main/java/net/Indyuce/mmocore/experience/droptable/ExperienceTable.java index e4dbd0d3..0866aa29 100644 --- a/src/main/java/net/Indyuce/mmocore/experience/droptable/ExperienceTable.java +++ b/src/main/java/net/Indyuce/mmocore/experience/droptable/ExperienceTable.java @@ -4,6 +4,7 @@ import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.experience.ExperienceObject; import org.apache.commons.lang.Validate; +import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import java.util.ArrayList; @@ -44,6 +45,7 @@ public class ExperienceTable { */ public void claim(PlayerData levelingUp, int professionLevel, ExperienceObject object) { for (ExperienceItem item : items) { + int timesClaimed = levelingUp.getClaims(object, this, item); if (!item.roll(professionLevel, timesClaimed)) continue;