diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2023-02-04 13:17:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-04 14:17:16 +0100 |
commit | e9a07b41c5124a357ea1231af04f2a6b3c2daffa (patch) | |
tree | 820633c22abf59e2d8b96f3101867cad314a0048 /src/main | |
parent | 75c6b9a2312682d059c6786f5253028566fbad94 (diff) | |
download | NotEnoughUpdates-e9a07b41c5124a357ea1231af04f2a6b3c2daffa.tar.gz NotEnoughUpdates-e9a07b41c5124a357ea1231af04f2a6b3c2daffa.tar.bz2 NotEnoughUpdates-e9a07b41c5124a357ea1231af04f2a6b3c2daffa.zip |
Add support for all xp pets (#514)
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java index e350c489..716fb37d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java @@ -447,13 +447,14 @@ public class PetInfoOverlay extends TextOverlay { if (pet.petLevel.getCurrentLevel() >= pet.petLevel.getMaxLevel()) return 0; if (validXpTypes == null) - validXpTypes = Lists.newArrayList("mining", "foraging", "enchanting", "farming", "combat", "fishing", "alchemy"); + validXpTypes = Lists.newArrayList("mining", "foraging", "enchanting", "farming", "combat", "fishing", "alchemy", "all"); if (!validXpTypes.contains(xpType.toLowerCase())) return 0; float tamingPercent = 1.0f + (config.tamingLevel / 100f); xp = xp * tamingPercent; xp = xp + (xp * config.beastMultiplier / 100f); - if (pet.petXpType != null && !pet.petXpType.equalsIgnoreCase(xpType)) { + + if (pet.petXpType != null && !pet.petXpType.equalsIgnoreCase(xpType) && !pet.petXpType.equalsIgnoreCase("all")) { xp = xp / 3f; if (xpType.equalsIgnoreCase("alchemy") || xpType.equalsIgnoreCase("enchanting")) { @@ -463,6 +464,7 @@ public class PetInfoOverlay extends TextOverlay { if (xpType.equalsIgnoreCase("mining") || xpType.equalsIgnoreCase("fishing")) { xp = xp * 1.5f; } + if (pet.petItem != null) { Matcher petItemMatcher = XP_BOOST_PATTERN.matcher(pet.petItem); if ((petItemMatcher.matches() && petItemMatcher.group(1).equalsIgnoreCase(xpType)) |