0.1.149: Lernplan-Symbole/Tooltips, Item-Tooltips, Nachnahme-Anhang (1.12-Form), Brett eigenes Fenster, ClassicAPI-Pruefung, Start-Itemkatalog

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
Lacustat
2026-10-28 12:58:11 +01:00
co-authored by Claude Sonnet 5.5
parent 220aa31d44
commit 357826045c
5 changed files with 40 additions and 11 deletions
+21 -7
View File
@@ -353,10 +353,12 @@ local function ItemIndex()
end
end
end
-- Items aus den Startdaten, deren Itemdaten schon geladen sind (sonst nur Zahlen ohne Namen)
-- Items aus den Startdaten, deren Name bekannt ist: aus dem Client oder aus dem mitgelieferten Katalog
-- (Name, Stufe, Preis ohne Serverabfrage). Unbekannte erscheinen, sobald der Client sie geladen hat.
local CatGet = Codex.Catalog and Codex.Catalog.GetItem
if Codex.Forever and Codex.Forever.ItemIds then
for id in pairs(Codex.Forever.ItemIds()) do
if not index[id] and Util.GetItem(id) then
if not index[id] and (Util.GetItem(id) or (CatGet and CatGet(id))) then
local it = Codex.Forever.Item(id)
local f = { zones = {}, best = 0, fe = true }
if it then
@@ -2142,6 +2144,11 @@ local function Build(content)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
pcall(GameTooltip.SetItemByID, GameTooltip, self.itemID)
GameTooltip:Show()
elseif self.tip and GameTooltip then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
GameTooltip:SetText(self.tip[1] or "", 1, 1, 1)
for ti = 2, #self.tip do GameTooltip:AddLine(self.tip[ti], 0.8, 0.8, 0.8) end
GameTooltip:Show()
elseif self.spellID and GameTooltip then
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
local ok = pcall(GameTooltip.SetSpellByID, GameTooltip, self.spellID)
@@ -2283,7 +2290,7 @@ local function Build(content)
elseif style == "heading" then h = 28; top = 12
elseif style == "item" or style == "link" then h = 26
elseif style == "text" then h = TextHeight(opts.text) end
if opts.spellID then h = 26 end
if opts.spellID or opts.tip then h = 26 end
row:ClearAllPoints()
row:SetPoint("TOPLEFT", detail.child, "TOPLEFT", 0, -(self.y + top))
row:SetPoint("TOPRIGHT", detail.child, "TOPRIGHT", 0, -(self.y + top))
@@ -2299,7 +2306,8 @@ local function Build(content)
row.onClick = opts.onClick
row.itemID = opts.itemID
row.spellID = opts.spellID
row:EnableMouse(row.clickable or opts.itemID ~= nil or opts.spellID ~= nil)
row.tip = opts.tip
row:EnableMouse(row.clickable or opts.itemID ~= nil or opts.spellID ~= nil or opts.tip ~= nil)
local leftX = 4 + indent
if opts.icon then
@@ -3287,10 +3295,16 @@ local function Build(content)
D:Add({ style = "heading", text = string.format(L.CODEX_SEC_LEARN_SPELLS, #g.spells) })
for _, sp in ipairs(g.spells) do
local rank = sp.rk or (sp.sp and Codex.SpellRank(sp.sp)) or nil
local icon = sp.sp and Codex.SpellIcon(sp.sp) or nil
D:Add({ text = (sp.nm or "?") .. (rank and (" |cff9a9aa3(" .. rank .. ")|r") or ""),
local icon = sp.sp and Codex.SpellIcon(sp.sp) or sp.ic or nil
local tip
if not sp.sp then
tip = { (sp.nm or "?") .. (rank and (" (" .. rank .. ")") or "") }
if lv > 0 then tip[#tip + 1] = string.format(L.CODEX_TRAIN_LEVEL, lv) end
if sp.cost and sp.cost > 0 then tip[#tip + 1] = FormatMoney(sp.cost) end
end
D:Add({ tip = tip, text = (sp.nm or "?") .. (rank and (" |cff9a9aa3(" .. rank .. ")|r") or ""),
right = (sp.cost and sp.cost > 0) and FormatMoney(sp.cost) or "-", rightWidth = 150,
spellID = sp.sp, icon = icon or (sp.sp and "Interface\\Icons\\INV_Misc_QuestionMark") or nil })
spellID = sp.sp, icon = icon or "Interface\\Icons\\INV_Misc_QuestionMark" })
end
D:Add({ style = "heading", text = string.format(L.CODEX_SEC_LEARN_TRAINERS, #g.trainers) })
for i, id in ipairs(g.trainers) do