aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2023-01-19 04:03:55 +1100
committerGitHub <noreply@github.com>2023-01-18 18:03:55 +0100
commitcc3d273d81ecb3b1ab5af9902388f4b3be744c5c (patch)
treed51df1f9a07fa5e8e5c0805a4151eb2ce9299ebb /src/main/java
parentedac10d8d22295fc6027266fba8466f3fa5f7a0b (diff)
downloadNotEnoughUpdates-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')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java5
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;
}