aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
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