From cc3d273d81ecb3b1ab5af9902388f4b3be744c5c Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Thu, 19 Jan 2023 04:03:55 +1100 Subject: Added ability to multiply pet xp gain per pet (#553) --- .../moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java') 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 1ba62308..e350c489 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java @@ -470,6 +470,11 @@ public class PetInfoOverlay extends TextOverlay { xp = xp * getBoostMultiplier(pet.petItem); } } + JsonObject pets = Constants.PETS; + if (pets != null && pets.has("custom_pet_leveling") && pets.get("custom_pet_leveling").getAsJsonObject().has(pet.petType.toUpperCase()) && + pets.get("custom_pet_leveling").getAsJsonObject().get(pet.petType.toUpperCase()).getAsJsonObject().has("xp_multiplier")) { + xp *= pets.get("custom_pet_leveling").getAsJsonObject().get(pet.petType.toUpperCase()).getAsJsonObject().get("xp_multiplier").getAsFloat(); + } return xp; } -- cgit