From 9af3647c5133b3a30b6478554a791b2cc61195ba Mon Sep 17 00:00:00 2001 From: marmadukeG Date: Sun, 24 Sep 2023 13:59:39 -0500 Subject: [PATCH 1/3] Re-working checkRange to make take into account thieving boost --- .../requirements/player/SkillRequirement.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/questhelper/requirements/player/SkillRequirement.java b/src/main/java/com/questhelper/requirements/player/SkillRequirement.java index 22461aeb95..86917784c3 100644 --- a/src/main/java/com/questhelper/requirements/player/SkillRequirement.java +++ b/src/main/java/com/questhelper/requirements/player/SkillRequirement.java @@ -35,6 +35,7 @@ import lombok.Getter; import net.runelite.api.Client; import net.runelite.api.Skill; +import static net.runelite.api.Skill.THIEVING; /** * Requirement that checks if a player meets a certain skill level. @@ -132,6 +133,14 @@ public boolean checkRange(Skill skill, int requiredLevel, Client client, QuestHe { highestBoost = 5; } + else if (skill == THIEVING && client.getRealSkillLevel(skill) < 65){ //player only has access to Summer sq'irk juice at level 65 thieving which is the default boost value for thieving, currently that's blind to player current skill level + if(client.getRealSkillLevel(skill) >= 45){ + highestBoost = 2; + } + else{ + highestBoost = 1; + } + } return requiredLevel - highestBoost <= currentSkill; } From 772e8d372b046b00cf9ff9cb1faad6d58f27b38c Mon Sep 17 00:00:00 2001 From: marmadukeG Date: Sun, 24 Sep 2023 16:44:29 -0500 Subject: [PATCH 2/3] re-factoring with pajlada's comments for readability --- .../requirements/player/SkillRequirement.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/questhelper/requirements/player/SkillRequirement.java b/src/main/java/com/questhelper/requirements/player/SkillRequirement.java index 86917784c3..1ab00d725e 100644 --- a/src/main/java/com/questhelper/requirements/player/SkillRequirement.java +++ b/src/main/java/com/questhelper/requirements/player/SkillRequirement.java @@ -133,12 +133,12 @@ public boolean checkRange(Skill skill, int requiredLevel, Client client, QuestHe { highestBoost = 5; } - else if (skill == THIEVING && client.getRealSkillLevel(skill) < 65){ //player only has access to Summer sq'irk juice at level 65 thieving which is the default boost value for thieving, currently that's blind to player current skill level - if(client.getRealSkillLevel(skill) >= 45){ - highestBoost = 2; + else if (skill == THIEVING){ //player only has access to Summer sq'irk juice at level 65 thieving which is the default boost value for thieving, currently that's blind to player current skill level + if(client.getRealSkillLevel(skill) < 65){ + highestBoost = 2; //autumn sq'irk } - else{ - highestBoost = 1; + else if(client.getRealSkillLevel(skill) < 45){ + highestBoost = 1; //spring sq'irk } } From 3304d49eca10e3e16ff6d60e19c931246e0648c1 Mon Sep 17 00:00:00 2001 From: marmadukeG Date: Mon, 25 Sep 2023 14:52:04 -0500 Subject: [PATCH 3/3] ran the code formatter --- .../requirements/player/SkillRequirement.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/questhelper/requirements/player/SkillRequirement.java b/src/main/java/com/questhelper/requirements/player/SkillRequirement.java index 1ab00d725e..94c09282d8 100644 --- a/src/main/java/com/questhelper/requirements/player/SkillRequirement.java +++ b/src/main/java/com/questhelper/requirements/player/SkillRequirement.java @@ -133,11 +133,15 @@ public boolean checkRange(Skill skill, int requiredLevel, Client client, QuestHe { highestBoost = 5; } - else if (skill == THIEVING){ //player only has access to Summer sq'irk juice at level 65 thieving which is the default boost value for thieving, currently that's blind to player current skill level - if(client.getRealSkillLevel(skill) < 65){ + else if (skill == THIEVING) + { + //player only has access to Summer sq'irk juice at level 65 thieving which is the default boost value for thieving, currently that's blind to player current skill level + if (client.getRealSkillLevel(skill) < 65) + { highestBoost = 2; //autumn sq'irk } - else if(client.getRealSkillLevel(skill) < 45){ + else if (client.getRealSkillLevel(skill) < 45) + { highestBoost = 1; //spring sq'irk } }