From 94517b10f9a005e9996b4d8a6c831eed80c958b4 Mon Sep 17 00:00:00 2001 From: Cow Date: Sat, 24 Apr 2021 13:50:31 +0200 Subject: Added spirit pet to Dungeon player lookup --- CHANGELOG.md | 8 +++++--- src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java | 9 +++++++++ src/main/java/de/cowtipper/cowlection/listener/ChatListener.java | 6 ++++++ .../cowlection/listener/skyblock/DungeonsPartyListener.java | 6 ++++++ 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af6eb34..ba2e491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,10 +36,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Refined the comma representation of large numbers abbreviated with k, m, b -- Dungeon Party Finder: Parties with specific classes can now *always* be marked as 'unideal' (additionally to the already existing option to mark a party when 2+ members use the same specific class) -- Dungeon Performance Overlay: added an alternative text border option - "Copy inventories to clipboard"-feature now automatically decodes base64 data (e.g. skin details) and unix timestamps -- Dungeon Party Finder: colored overlay is now also disable-able via config +- Dungeon Party Finder: + - Parties with specific classes can now *always* be marked as 'unideal' (additionally to the already existing option to mark a party when 2+ members use the same specific class) + - colored overlay is now also disable-able via config + - Player lookup now shows - in addition to the active pet - a spirit pet +- Dungeon Performance Overlay: added an alternative text border option ### Fixed - Fixed issue with 'no dung class selected' diff --git a/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java b/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java index d2fff18..b9a0bbb 100644 --- a/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java +++ b/src/main/java/de/cowtipper/cowlection/data/HySkyBlockStats.java @@ -214,6 +214,15 @@ public class HySkyBlockStats { return null; } + public Pet getPet(String type) { + for (Pet pet : pets) { + if (type.equals(pet.type)) { + return pet; + } + } + return null; + } + public int getMaxFarmingLevel() { int farmingLevelCap = 50; if (jacob2 != null && jacob2.perks != null) { diff --git a/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java b/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java index 45b99a7..b1afb47 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/ChatListener.java @@ -224,6 +224,12 @@ public class ChatListener { HySkyBlockStats.Profile.Pet activePet = member.getActivePet(); String petInfo = (outputAsChatMessages ? "\n " : "\n\n") + EnumChatFormatting.GRAY + "Active pet: " + (activePet != null ? activePet.toFancyString() : "" + EnumChatFormatting.DARK_GRAY + EnumChatFormatting.ITALIC + "none"); + // spirit pet: + HySkyBlockStats.Profile.Pet spiritPet = member.getPet("SPIRIT"); + if (spiritPet != null) { + petInfo += EnumChatFormatting.GRAY + " (" + spiritPet.toFancyString() + EnumChatFormatting.GRAY + ")"; + } + String highestFloorCompletions = "\n" + (outputAsChatMessages ? " " : "") + EnumChatFormatting.GRAY + "Completed no dungeons yet"; String skyBlockDetails; diff --git a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsPartyListener.java b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsPartyListener.java index 9df27c5..4630a96 100644 --- a/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsPartyListener.java +++ b/src/main/java/de/cowtipper/cowlection/listener/skyblock/DungeonsPartyListener.java @@ -237,6 +237,12 @@ public class DungeonsPartyListener { .append("\n").append(String.join("\n", member.getArmor())) .append("\n\n").append(EnumChatFormatting.GRAY).append("Active pet: ").append(activePet != null ? activePet.toFancyString() : "" + EnumChatFormatting.DARK_GRAY + EnumChatFormatting.ITALIC + "none"); + // spirit pet: + HySkyBlockStats.Profile.Pet spiritPet = member.getPet("SPIRIT"); + if (spiritPet != null) { + playerTooltip.append(EnumChatFormatting.GRAY).append(" (").append(spiritPet.toFancyString()).append(EnumChatFormatting.GRAY).append(")"); + } + HySkyBlockStats.Profile.Dungeons dungeons = member.getDungeons(); boolean hasNotPlayedDungeons = dungeons == null || !dungeons.hasPlayed(); if (hasNotPlayedDungeons) { -- cgit