mirror of
https://github.com/Lacustat/Freewood-OctoWoW-Codex.git
synced 2026-10-30 18:57:04 +00:00
0.1.173: Codex-Liste nur bei relevanten Aenderungen neu aufbauen
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
f38c028916
commit
e5c71f8921
+19
-2
@@ -4278,10 +4278,27 @@ local function Build(content)
|
||||
end
|
||||
if _G.C_Timer and _G.C_Timer.After then _G.C_Timer.After(REFRESH_GAP, Run) else Run() end
|
||||
end
|
||||
FW:On("CODEX_CHANGED", function()
|
||||
-- Welche Aenderungen die Liste betreffen: Messwerte (Erfahrung, Kampfdauer, Orte, Verbindungen, Karte, Auktion)
|
||||
-- gar nicht; grosse Datenaenderungen (Startdaten, Import, Berechtigung, Katalog) immer; Aenderungen an einzelnen
|
||||
-- Kreaturen/Objekten/Quests nur, wenn der Eintrag gerade in der Liste steht (sonst beim naechsten Bedienen).
|
||||
local IGNORE_KINDS = { xp = true, ttk = true, spots = true, transport = true, taxi = true, mapscan = true, auction = true }
|
||||
local BIG_KINDS = { forever = true, import = true, trust = true, catalog = true }
|
||||
local KIND_OF_EVENT = { unit = "units", object = "objects", quest = "quests", item = "items" }
|
||||
local function RowShows(id)
|
||||
for i = 1, #listRows do
|
||||
local row = listRows[i]
|
||||
if row:IsShown() and row.entryID == id then return true end
|
||||
end
|
||||
return false
|
||||
end
|
||||
FW:On("CODEX_CHANGED", function(_, what, id)
|
||||
if IGNORE_KINDS[what] then return end
|
||||
dirty = true
|
||||
dataVersion = dataVersion + 1
|
||||
if f:IsShown() then
|
||||
if not f:IsShown() then return end
|
||||
if BIG_KINDS[what] then
|
||||
ScheduleRefresh(false)
|
||||
elseif KIND_OF_EVENT[what] == kind and (id == nil or RowShows(id)) then
|
||||
ScheduleRefresh(false)
|
||||
end
|
||||
end, f)
|
||||
|
||||
@@ -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.172
|
||||
## Version: 0.1.173
|
||||
## Dependencies: Freewood-OctoWoW-Core
|
||||
## OptionalDeps: Freewood-OctoWoW-CodexData, Freewood-OctoWoW-ForeverData
|
||||
|
||||
|
||||
Reference in New Issue
Block a user