aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2023-06-19 18:37:26 +0200
committerGitHub <noreply@github.com>2023-06-19 18:37:26 +0200
commit7fd26d14e742c974ec50686c375ccdfd9c968faf (patch)
tree0ceb5fbb46d6619b912f8136f3ff7fb4f8848d25 /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures
parentf7168033b41ee84a58adbd005b6ba8898b38cb5a (diff)
downloadnotenoughupdates-7fd26d14e742c974ec50686c375ccdfd9c968faf.tar.gz
notenoughupdates-7fd26d14e742c974ec50686c375ccdfd9c968faf.tar.bz2
notenoughupdates-7fd26d14e742c974ec50686c375ccdfd9c968faf.zip
Fix hot potato book being parsed as potato (#722)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
index 96e0765d..8bd5e84d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/DungeonNpcProfitOverlay.java
@@ -361,8 +361,10 @@ public class DungeonNpcProfitOverlay {
return new SkyblockItem(internalName, amount);
} else {
// Remove Book (from hot potato book), as a perf optimization since "book" is a very common phrase
- String id = ItemResolutionQuery.findInternalNameByDisplayName(
- line.trim().replace("Book", ""), true);
+ String trimmedLine = line.trim();
+ String id =
+ ItemResolutionQuery.filterInternalNameCandidates(ItemResolutionQuery.findInternalNameCandidatesForDisplayName(
+ trimmedLine.replace("Book", "")), trimmedLine, true);
if (id == null) return null;
return new SkyblockItem(id, 1);
}