From 71e079323f9bf9608e27e33c1366b6a953e63a48 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 23 Sep 2023 18:33:07 +0200 Subject: Do not show an error message when there is no internal name. --- src/main/java/at/hannibal2/skyhanni/utils/ItemUtils.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/at') 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 -- cgit