Skip to content

Commit

Permalink
Re-working checkRange to make take into account thieving boost (#1286)
Browse files Browse the repository at this point in the history
  • Loading branch information
marmadukeG authored Oct 26, 2023
1 parent 669718b commit 5c1ef31
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -132,6 +133,18 @@ 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)
{
highestBoost = 2; //autumn sq'irk
}
else if (client.getRealSkillLevel(skill) < 45)
{
highestBoost = 1; //spring sq'irk
}
}

return requiredLevel - highestBoost <= currentSkill;
}
Expand Down

0 comments on commit 5c1ef31

Please sign in to comment.