Quantcast

Added endpoint for if the transmog is known or not.

Salvatore Lopiparo [07-22-16 - 01:10]
Added endpoint for if the transmog is known or not.
Filename
code.lua
diff --git a/code.lua b/code.lua
index daf14d3..7382734 100644
--- a/code.lua
+++ b/code.lua
@@ -455,6 +455,12 @@ function CanIMogIt:IsTransmogable(itemLink)
 end


+function CanIMogIt:TextIsKnown(text)
+	-- Returns whether the text is considered to be a KNOWN value or not.
+	return knownTexts[text] or false
+end
+
+
 function CanIMogIt:GetItemID(itemLink)
 	return tonumber(itemLink:match("item:(%d+)"))
 end
@@ -550,7 +556,7 @@ local function addToTooltip(tooltip, itemLink)
 		-- If we don't want to show the tooltip if it's not transmoggable
 		return
 	end
-	if CanIMogItOptions["showUnknownOnly"] and knownTexts[text] then
+	if CanIMogItOptions["showUnknownOnly"] and CanIMogIt:TextIsKnown(text) then
 		-- We don't want to show the tooltip if it's already known.
 		return
 	end