aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorVixid <52578495+Vixid1@users.noreply.github.com>2022-10-19 11:25:53 +0100
committerGitHub <noreply@github.com>2022-10-19 12:25:53 +0200
commit04f8a44c150ab46997bbde53b8a4cf65aaa39327 (patch)
treef85ddd21369b54347cd1cb8675f5d4e0f14e1eba /src/main
parentb967e1be50e31decfea30e08b4bf074eaed36e98 (diff)
downloadNotEnoughUpdates-04f8a44c150ab46997bbde53b8a4cf65aaa39327.tar.gz
NotEnoughUpdates-04f8a44c150ab46997bbde53b8a4cf65aaa39327.tar.bz2
NotEnoughUpdates-04f8a44c150ab46997bbde53b8a4cf65aaa39327.zip
Couple minor bug fixes (#377)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java2
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java10
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java2
3 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java
index b1ab11c1..04d97747 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DamageCommas.java
@@ -88,7 +88,7 @@ public class DamageCommas {
if (matcherNoCrit.matches()) {
numbers = matcherNoCrit.group(2).replace(",", "");
prefix = matcherNoCrit.group(1);
- suffix = "\u00A7r" + matcherNoCrit.group(3);
+ suffix = "\u00A7r" + (matcherNoCrit.group(3).contains("♞") ? "\u00A7d" + matcherNoCrit.group(3) : matcherNoCrit.group(3));
} else {
replacementMap.put(entity, null);
return name;
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java
index 4aeafb9e..a43e2b98 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java
@@ -1033,6 +1033,7 @@ public class ProfileViewer {
if (profileInfo == null) return null;
if (profileName == null) profileName = latestProfile;
+ List<JsonObject> coopProfileInfo = getCoopProfileInformation(profileName);
if (skyblockInfoCache.containsKey(profileName)) return skyblockInfoCache.get(profileName);
JsonObject leveling = Constants.LEVELING;
@@ -1062,6 +1063,15 @@ public class ProfileViewer {
Utils.getElement(profileInfo, "experience_skill_" + (skillName.equals("social") ? "social2" : skillName)),
0
);
+ // Get the coop's social skill experience since social is a shared skill
+ if (skillName.equals("social")) {
+ for (JsonObject coopProfile : coopProfileInfo) {
+ skillExperience += Utils.getElementAsFloat(
+ Utils.getElement(coopProfile, "experience_skill_social2"),
+ 0
+ );
+ }
+ }
totalSkillXP += skillExperience;
JsonArray levelingArray = Utils.getElement(leveling, "leveling_xp").getAsJsonArray();
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
index 8b81d1b4..6187495c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemUtils.java
@@ -250,6 +250,7 @@ public class ItemUtils {
for (int i = 0; i < newLore.size(); i++) {
String cleaned = Utils.cleanColour(newLore.get(i));
if (cleaned.equals("Right-click to add this pet to")) {
+ if (heldItem == null) newLore.remove(i + 2);
newLore.remove(i + 1);
newLore.remove(i);
secondLastBlankLine = i - 1;
@@ -277,6 +278,7 @@ public class ItemUtils {
petItemLore.add("");
}
petItemLore.add("§a(" + currentPet.candyUsed + "/10) Pet Candy Used");
+ if (heldItem == null) petItemLore.add("");
}
newLore.addAll(secondLastBlankLine + 1, petItemLore);
}