Skip to content

Commit

Permalink
Merge pull request #880 from BigloBot/pv-fixes
Browse files Browse the repository at this point in the history
[Profile Viewer] Use Taming Levels Added to API. Maybe fix wardrobe + inv.
  • Loading branch information
AzureAaron authored Aug 3, 2024
2 parents c160dac + 442f786 commit 9b4ca8c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public List<ItemStack> loadItems(JsonObject data) {
if (activeSlot != -1) {
List<ItemStack> activeArmour = super.loadItems(activeArmorSet).reversed();
for (int i = 0; i < 4; i++) {
int baseIndex = activeSlot % 9;
int page = activeSlot / 9;
int slotIndex = (page * 36) + (i * 9) + baseIndex - 1;
int baseIndex = (activeSlot - 1) % 9;
int page = (activeSlot - 1) / 9;
int slotIndex = (page * 36) + (i * 9) + baseIndex;
itemList.set(slotIndex, activeArmour.get(i));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public void render(DrawContext context, int mouseX, int mouseY, int x, int y) {
fillColor = Color.MAGENTA;
}

if ((SOFT_SKILL_CAP.containsKey(SKILL_NAME) && SKILL_LEVEL.level > SOFT_SKILL_CAP.get(SKILL_NAME)) && SKILL_LEVEL.level < SKILL_CAP.get(SKILL_NAME) && SKILL_LEVEL.fill == 1 ||
(SKILL_NAME.equals("Taming") && SKILL_LEVEL.level >= SOFT_SKILL_CAP.get(SKILL_NAME))) {
if ((SOFT_SKILL_CAP.containsKey(SKILL_NAME) && SKILL_LEVEL.level > SOFT_SKILL_CAP.get(SKILL_NAME))
&& SKILL_LEVEL.level < SKILL_CAP.get(SKILL_NAME) && SKILL_LEVEL.fill == 1) {
fillColor = Color.YELLOW;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ private int getSkillCap(String skill) {
try {
return switch (skill) {
case "Farming" -> this.PLAYER_PROFILE.getAsJsonObject("jacobs_contest").getAsJsonObject("perks").get("farming_level_cap").getAsInt();
case "Taming" -> this.PLAYER_PROFILE.getAsJsonObject("pets_data").getAsJsonObject("pet_care").get("pet_types_sacrificed").getAsJsonArray().size();
default -> -1;
};
} catch (Exception e) {
Expand Down

0 comments on commit 9b4ca8c

Please sign in to comment.