diff --git a/Cork.toc b/Cork.toc index 516021d..574d243 100644 --- a/Cork.toc +++ b/Cork.toc @@ -15,7 +15,6 @@ ## OptionalDeps: tekErr -externals\ptr.lua externals\timer.lua externals\tooltip_scanner.lua externals\ui-tab.lua diff --git a/KeyBlacklist.lua b/KeyBlacklist.lua index e6b6f7a..ffd3e5a 100644 --- a/KeyBlacklist.lua +++ b/KeyBlacklist.lua @@ -29,6 +29,7 @@ local keys = { "TestWithoutResting", "tiplink", "tiptext", + "toyname", "type", "UNIT_AURA", "UNIT_INVENTORY_CHANGED", diff --git a/externals.txt b/externals.txt index 3e53563..a7c2d11 100644 --- a/externals.txt +++ b/externals.txt @@ -1,4 +1,3 @@ -ptr.lua timer.lua tooltip_scanner.lua ui-tab.lua diff --git a/externals/ptr.lua b/externals/ptr.lua deleted file mode 100644 index 06a215d..0000000 --- a/externals/ptr.lua +++ /dev/null @@ -1,4 +0,0 @@ - -local myname, ns = ... - -ns.is_six_one = GetBuildInfo() == "6.1.0" diff --git a/modules/BuffItems.lua b/modules/BuffItems.lua index d2159c2..16bee1c 100644 --- a/modules/BuffItems.lua +++ b/modules/BuffItems.lua @@ -44,8 +44,6 @@ function dataobj:Init() end -if not Cork.is_six_one then return end - -- Bodyguard Miniaturization Device local dataobj = Cork:GenerateItemSelfBuffer(122298) dataobj.Test = dataobj.TestWithoutResting diff --git a/templates/ItemSelfBuffer.lua b/templates/ItemSelfBuffer.lua index 38ccaa5..4fefeed 100644 --- a/templates/ItemSelfBuffer.lua +++ b/templates/ItemSelfBuffer.lua @@ -9,13 +9,15 @@ local function Init(self) self.spellname = self.name self.spells = {self.name} self.iconline = ns.IconLine(GetItemIcon(self.itemid), self.name) - ns.defaultspc[self.name.."-enabled"] = GetItemCount(self.itemid) > 0 + local itemID, name, texture, collected = C_ToyBox.GetToyInfo(self.itemid) + self.toyname = name + ns.defaultspc[self.name.."-enabled"] = collected or (GetItemCount(self.itemid) > 0) end local function CorkIt(self, frame) if self.player then - local item = "item:".. self.itemid + local item = self.toyname or ("item:".. self.itemid) return frame:SetManyAttributes("type1", "item", "item1", item) end end