aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-23 18:33:07 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-23 18:33:07 +0200
commit71e079323f9bf9608e27e33c1366b6a953e63a48 (patch)
tree508e972627a298fcc9117d090be1f5ed301c43e4 /src/main/java/at/hannibal2/skyhanni/utils
parent8d979f9aa3c1dedb6eec3e0ec94e41462224655e (diff)
downloadskyhanni-71e079323f9bf9608e27e33c1366b6a953e63a48.tar.gz
skyhanni-71e079323f9bf9608e27e33c1366b6a953e63a48.tar.bz2
skyhanni-71e079323f9bf9608e27e33c1366b6a953e63a48.zip
Do not show an error message when there is no internal name.
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
index 10fd389d9..785b21b6b 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt
@@ -165,6 +165,12 @@ object ItemUtils {
}
data.itemRarityLastCheck = SimpleTimeMark.now().toMillis()
+ val internalName = getInternalName()
+ if (internalName == NEUInternalName.NONE) {
+ data.itemRarity = null
+ return null
+ }
+
if (isPet(cleanName())) {
return getPetRarity(this)
@@ -175,7 +181,7 @@ object ItemUtils {
if (rarity == null && logError) {
CopyErrorCommand.logErrorState(
"Could not read rarity for item $name",
- "getItemRarityOrNull not found for: ${getInternalName()}, name:'$name''"
+ "getItemRarityOrNull not found for: $internalName, name:'$name''"
)
}
return rarity