diff --git a/Addon.lua b/Addon.lua index b1d2ea6..0461b4a 100644 --- a/Addon.lua +++ b/Addon.lua @@ -26,6 +26,8 @@ local ShowUIPanel = LibStub('LibShowUIPanel-1.0').ShowUIPanel ---@field GlyphFrame UI.GlyphFrame ---@field PaperDoll UI.PaperDoll ---@field InspectTalent UI.InspectTalent +---@field ModelFrame UI.ModelFrame +---@field SlotItem UI.SlotItem ns.UI = {} ns.L = LibStub('AceLocale-3.0'):GetLocale('tdInspect') diff --git a/Api.lua b/Api.lua index 38c622f..579e79b 100644 --- a/Api.lua +++ b/Api.lua @@ -117,15 +117,6 @@ end local cache = {} function ns.GetItemGems(link, out) return FillGem(out or wipe(cache), link:match('item:%d+:?[-%d]*:?(%d*):?(%d*):?(%d*):?(%d*)')) - -- out = out or wipe(cache) - -- for i = 1, 4 do - -- local _, gemLink = GetItemGem(link, i) - -- local gemId = gemLink and ns.ItemLinkToId(gemLink) - -- if gemId then - -- tinsert(out, gemId) - -- end - -- end - -- return out end function ns.GetGlyphIdBySpellId(spellId) @@ -173,3 +164,22 @@ function ns.GetItemEnchantInfo(link) end end end + +local GLYPH_SLOTS = { + [1] = { id = 21, level = 15 }, + [2] = { id = 22, level = 15 }, + [3] = { id = 23, level = 50 }, + [4] = { id = 24, level = 30 }, + [5] = { id = 25, level = 70 }, + [6] = { id = 26, level = 80 }, +} + +function ns.GetGlyphSlotRequireLevel(slot) + local d = GLYPH_SLOTS[slot] + return d and d.level +end + +function ns.GetGlyphSlotId(slot) + local d = GLYPH_SLOTS[slot] + return d and d.id +end diff --git a/Data/Glyph.lua b/Data/Glyph.lua deleted file mode 100644 index 983b05e..0000000 --- a/Data/Glyph.lua +++ /dev/null @@ -1,26 +0,0 @@ --- Glyph.lua --- @Author : Dencer (tdaddon@163.com) --- @Link : https://dengsir.github.io --- @Date : 2022/9/25 12:56:20 --- ----@class ns -local ns = select(2, ...) - -local GLYPH_SLOTS = { - [1] = { id = 21, level = 15 }, - [2] = { id = 22, level = 15 }, - [3] = { id = 23, level = 50 }, - [4] = { id = 24, level = 30 }, - [5] = { id = 25, level = 70 }, - [6] = { id = 26, level = 80 }, -} - -function ns.GetGlyphSlotRequireLevel(slot) - local d = GLYPH_SLOTS[slot] - return d and d.level -end - -function ns.GetGlyphSlotId(slot) - local d = GLYPH_SLOTS[slot] - return d and d.id -end diff --git a/Load.xml b/Load.xml index 6e1f581..9c04992 100644 --- a/Load.xml +++ b/Load.xml @@ -6,7 +6,6 @@