diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2023-01-19 04:03:55 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 18:03:55 +0100 |
commit | cc3d273d81ecb3b1ab5af9902388f4b3be744c5c (patch) | |
tree | d51df1f9a07fa5e8e5c0805a4151eb2ce9299ebb /src/main/java/io | |
parent | edac10d8d22295fc6027266fba8466f3fa5f7a0b (diff) | |
download | NotEnoughUpdates-cc3d273d81ecb3b1ab5af9902388f4b3be744c5c.tar.gz NotEnoughUpdates-cc3d273d81ecb3b1ab5af9902388f4b3be744c5c.tar.bz2 NotEnoughUpdates-cc3d273d81ecb3b1ab5af9902388f4b3be744c5c.zip |
Added ability to multiply pet xp gain per pet (#553)
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | 5 |
1 files changed, 5 insertions, 0 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 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; } |