Quantcast

huh. w/e

Darth Predator [04-14-17 - 23:59]
huh. w/e
Filename
ElvUI_SLE/modules/minimap/locationbar.lua
diff --git a/ElvUI_SLE/modules/minimap/locationbar.lua b/ElvUI_SLE/modules/minimap/locationbar.lua
index 7d991dc..882564b 100644
--- a/ElvUI_SLE/modules/minimap/locationbar.lua
+++ b/ElvUI_SLE/modules/minimap/locationbar.lua
@@ -18,7 +18,7 @@ local UNKNOWN, GARRISON_LOCATION_TOOLTIP, ITEMS, SPELLS, CLOSE, BACK = UNKNOWN,
 local DUNGEON_FLOOR_DALARAN1 = DUNGEON_FLOOR_DALARAN1
 local CHALLENGE_MODE = CHALLENGE_MODE
 local PlayerHasToy = PlayerHasToy
-local IsToyUsable = C_ToyBox.IsToyUsable
+local C_ToyBox = C_ToyBox
 local RAID_CLASS_COLORS = RAID_CLASS_COLORS

 local collectgarbage = collectgarbage
@@ -388,14 +388,15 @@ function LP:ItemList(check)
 	for i = 1, #LP.PortItems do
 		local tmp = {}
 		local data = LP.PortItems[i]
-		if SLE:BagSearch(data.secure.ID) or (PlayerHasToy(data.secure.ID) and IsToyUsable(data.secure.ID)) then
+		local ID, isToy = data.secure.ID, data.secure.isToy
+		if (not isToy and SLE:BagSearch(ID)) or (isToy and PlayerHasToy(ID) and C_ToyBox.IsToyUsable(ID)) then
 			if check then
 				if LP.db.portals.HSplace then T.tinsert(LP.MainMenu, {text = L["Hearthstone Location"]..": "..GetBindLocation(), title = true, nohighlight = true}) end
 				T.tinsert(LP.MainMenu, {text = ITEMS..":", title = true, nohighlight = true})
 				return true
 			else
 				if data.text then
-					local cd = DD:GetCooldown("Item", data.secure.ID)
+					local cd = DD:GetCooldown("Item", ID)
 					E:CopyTable(tmp, data)
 					if cd or (T.tonumber(cd) and T.tonumber(cd) > 1.5) then
 						tmp.text = "|cff636363"..tmp.text.."|r"..T.format(LP.CDformats[LP.db.portals.cdFormat], cd)