mirror of
https://github.com/Lacustat/Freewood-OctoWoW-Codex.git
synced 2026-11-02 21:36:55 +00:00
0.1.225: Itemdaten (Name, Symbol) bleiben nach Neustart erhalten, Geber-Namen im Levelplan aus der Codex-Liste
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
ea945b98f8
commit
005f9d37ac
@@ -434,6 +434,33 @@ function Codex.QualityOf(itemID)
|
||||
return Codex.db.iq and Codex.db.iq[itemID] or nil
|
||||
end
|
||||
|
||||
-- Itemdaten, die das Spiel liefert (Name, Qualitaet, Symbol), merken: nach einem Neustart sind sie sonst weg (der Client behaelt sie nicht)
|
||||
-- und die Listen zeigen erst wieder "#1234" und Fragezeichen, bis alles neu abgefragt ist.
|
||||
function Codex.RememberItem(itemID, info)
|
||||
if type(itemID) ~= "number" or type(info) ~= "table" then return end
|
||||
if info.name then NoteName(itemID, info.name) end
|
||||
if info.quality then Codex.RememberQuality(itemID, info.quality) end
|
||||
if type(info.icon) == "string" and info.icon ~= "" then
|
||||
local ic = Codex.db.iicon
|
||||
if not ic then ic = {} Codex.db.iicon = ic end
|
||||
if ic[itemID] ~= info.icon and (ic[itemID] ~= nil or (Codex.db.iiconN or 0) < 9000) then
|
||||
if ic[itemID] == nil then Codex.db.iiconN = (Codex.db.iiconN or 0) + 1 end
|
||||
ic[itemID] = info.icon
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if Util.RequestItem and not Codex.itemHooked then
|
||||
Codex.itemHooked = true
|
||||
local baseRequest = Util.RequestItem
|
||||
Util.RequestItem = function(itemID, callback)
|
||||
return baseRequest(itemID, function(info)
|
||||
if info and Codex.db then pcall(Codex.RememberItem, itemID, info) end
|
||||
if callback then return callback(info) end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
Codex.AddCell = AddCell
|
||||
Codex.NoteName = NoteName
|
||||
Codex.Str = Str
|
||||
|
||||
+1
-1
@@ -4121,7 +4121,7 @@ local function Build(content)
|
||||
end
|
||||
row.icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
|
||||
if e.itemID then
|
||||
row.icon:SetTexture(ICON.items)
|
||||
row.icon:SetTexture(Codex.db.iicon and Codex.db.iicon[e.itemID] or ICON.items)
|
||||
local q = Codex.QualityOf(e.itemID)
|
||||
if q then row.title:SetText(Colored(e.title, q)) end
|
||||
Util.RequestItem(e.itemID, function(info)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Notes: Learns quests, creatures and drops while you play: who gives and takes a quest, rewards, objectives, drop chances.
|
||||
## Notes-deDE: Lernt beim Spielen Quests, Kreaturen und Beute: wer eine Quest vergibt und annimmt, Belohnungen, Ziele, Drop-Chancen.
|
||||
## Author: Lacustat
|
||||
## Version: 0.1.224
|
||||
## Version: 0.1.225
|
||||
## Dependencies: Freewood-OctoWoW-Core
|
||||
## SavedVariablesPerCharacter: FreewoodSnapshot
|
||||
## OptionalDeps: Freewood-OctoWoW-CodexData, Freewood-OctoWoW-ForeverData
|
||||
|
||||
Reference in New Issue
Block a user