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 @@
-
diff --git a/Scripts/ItemEnchantGen.ts b/Scripts/ItemEnchantGen.ts
index ab0de80..b46dc6a 100644
--- a/Scripts/ItemEnchantGen.ts
+++ b/Scripts/ItemEnchantGen.ts
@@ -50,7 +50,8 @@ class App {
}
}
- const code = `select(2,...).ItemEnchantMake()
+ const code = `---@diagnostic disable: undefined-global
+select(2,...).ItemEnchantMake()
local n=nil
${codes.join('\n')}`;
diff --git a/Tooltip/FixRune.lua b/Tooltip/FixRune.lua
index ec81306..68f2f95 100644
--- a/Tooltip/FixRune.lua
+++ b/Tooltip/FixRune.lua
@@ -2,6 +2,8 @@
-- @Author : Dencer (tdaddon@163.com)
-- @Link : https://dengsir.github.io
-- @Date : 3/19/2024, 11:55:34 AM
+--
+---@class ns
local ns = select(2, ...)
local function ToPattern(p)
diff --git a/UI/GearFrame.lua b/UI/GearFrame.lua
index 9dfade6..3b180d9 100644
--- a/UI/GearFrame.lua
+++ b/UI/GearFrame.lua
@@ -97,7 +97,7 @@ function GearFrame:UpdateSize()
self[key]:SetWidth(v)
end
end
- self:SetWidth(width - SPACING_V + PADDING * 2)
+ self:SetWidth(max(width - SPACING_V + PADDING * 2, 165 + self.Name:GetStringWidth()))
end
function GearFrame:StartLayout()
diff --git a/UI/Template.xml b/UI/Template.xml
index 9491bbb..077fbe4 100644
--- a/UI/Template.xml
+++ b/UI/Template.xml
@@ -114,7 +114,7 @@
-
+