diff options
author | Cow <cow@volloeko.de> | 2021-04-24 13:50:31 +0200 |
---|---|---|
committer | Cow <cow@volloeko.de> | 2021-04-24 13:50:31 +0200 |
commit | 94517b10f9a005e9996b4d8a6c831eed80c958b4 (patch) | |
tree | f3efb53194e14130efdc295d0a8e603415ce8d7d /src/main/java/de | |
parent | c4392eb697e507340454a8735e7b4d3bd297f5f1 (diff) | |
download | Cowlection-94517b10f9a005e9996b4d8a6c831eed80c958b4.tar.gz Cowlection-94517b10f9a005e9996b4d8a6c831eed80c958b4.tar.bz2 Cowlection-94517b10f9a005e9996b4d8a6c831eed80c958b4.zip |
Added spirit pet to Dungeon player lookup
Diffstat (limited to 'src/main/java/de')
3 files changed, 21 insertions, 0 deletions
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) { |