From 5f815a090401a6fdc1ef462596a9902a0a01d0be Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Tue, 9 Mar 2021 23:59:23 -0500 Subject: Add combat 60 support --- src/main/java/me/Danker/commands/LobbySkillsCommand.java | 4 ++-- src/main/java/me/Danker/commands/SkillsCommand.java | 4 ++-- src/main/java/me/Danker/features/Skill50Display.java | 2 +- src/main/java/me/Danker/features/SkillTracker.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/me/Danker/commands/LobbySkillsCommand.java b/src/main/java/me/Danker/commands/LobbySkillsCommand.java index 61ceea7..3d0c575 100644 --- a/src/main/java/me/Danker/commands/LobbySkillsCommand.java +++ b/src/main/java/me/Danker/commands/LobbySkillsCommand.java @@ -104,7 +104,7 @@ public class LobbySkillsCommand extends CommandBase { miningLevel = (double) Math.round(miningLevel * 100) / 100; } if (latestProfile.has("experience_skill_combat")) { - combatLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_combat").getAsDouble(), 50); + combatLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_combat").getAsDouble(), 60); combatLevel = (double) Math.round(combatLevel * 100) / 100; } if (latestProfile.has("experience_skill_foraging")) { @@ -146,7 +146,7 @@ public class LobbySkillsCommand extends CommandBase { miningLevel = achievementObject.get("skyblock_excavator").getAsInt(); } if (achievementObject.has("skyblock_combat")) { - combatLevel = Math.min(achievementObject.get("skyblock_combat").getAsInt(), 50); + combatLevel = achievementObject.get("skyblock_combat").getAsInt(); } if (achievementObject.has("skyblock_gatherer")) { foragingLevel = Math.min(achievementObject.get("skyblock_gatherer").getAsInt(), 50); diff --git a/src/main/java/me/Danker/commands/SkillsCommand.java b/src/main/java/me/Danker/commands/SkillsCommand.java index 6edbb4e..a9ce9d1 100644 --- a/src/main/java/me/Danker/commands/SkillsCommand.java +++ b/src/main/java/me/Danker/commands/SkillsCommand.java @@ -100,7 +100,7 @@ public class SkillsCommand extends CommandBase { miningLevel = (double) Math.round(miningLevel * 100) / 100; } if (userObject.has("experience_skill_combat")) { - combatLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_combat").getAsDouble(), 50); + combatLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_combat").getAsDouble(), 60); combatLevel = (double) Math.round(combatLevel * 100) / 100; } if (userObject.has("experience_skill_foraging")) { @@ -144,7 +144,7 @@ public class SkillsCommand extends CommandBase { miningLevel = achievementObject.get("skyblock_excavator").getAsInt(); } if (achievementObject.has("skyblock_combat")) { - combatLevel = Math.min(achievementObject.get("skyblock_combat").getAsInt(), 50); + combatLevel = achievementObject.get("skyblock_combat").getAsInt(); } if (achievementObject.has("skyblock_gatherer")) { foragingLevel = Math.min(achievementObject.get("skyblock_gatherer").getAsInt(), 50); diff --git a/src/main/java/me/Danker/features/Skill50Display.java b/src/main/java/me/Danker/features/Skill50Display.java index 511bb16..3b73cf9 100644 --- a/src/main/java/me/Danker/features/Skill50Display.java +++ b/src/main/java/me/Danker/features/Skill50Display.java @@ -36,7 +36,7 @@ public class Skill50Display { double currentXp = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); int limit; int totalXp; - if (section.contains("Farming") || section.contains("Enchanting") || section.contains("Mining")) { + if (section.contains("Farming") || section.contains("Enchanting") || section.contains("Mining") || section.contains("Combat")) { limit = 60; totalXp = 111672425; } else { diff --git a/src/main/java/me/Danker/features/SkillTracker.java b/src/main/java/me/Danker/features/SkillTracker.java index 15e9fdd..60eb632 100644 --- a/src/main/java/me/Danker/features/SkillTracker.java +++ b/src/main/java/me/Danker/features/SkillTracker.java @@ -63,7 +63,7 @@ public class SkillTracker { } timeSinceGained = System.currentTimeMillis() / 1000; - int limit = section.contains("Farming") || section.contains("Enchanting") || section.contains("Mining") ? 60 : 50; + int limit = section.contains("Farming") || section.contains("Enchanting") || section.contains("Mining") || section.contains("Combat") ? 60 : 50; double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); int xpToLevelUp = Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")); xpLeft = xpToLevelUp - currentXP; -- cgit