mirror of
https://github.com/Lacustat/Freewood-OctoWoW-Codex.git
synced 2026-10-31 03:46:56 +00:00
0.1.172: Codex-Liste gebuendelt (3 s), Zonen-Cache 60 s
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
b94d8a1b44
commit
f38c028916
+22
-5
@@ -4258,20 +4258,37 @@ local function Build(content)
|
||||
return table.concat(t, "\n")
|
||||
end
|
||||
|
||||
-- Der Listenaufbau (alle Eintraege filtern und sortieren) kostet mit den Startdaten 0,2 bis 0,9 s. Aenderungen kommen
|
||||
-- aber im Sekundentakt (Name gelernt, Haendler, Erfahrung, Beute): gesammelt hoechstens alle REFRESH_GAP Sekunden aufbauen.
|
||||
local REFRESH_GAP = 3
|
||||
local refreshPending, refreshDetail = false, false
|
||||
local function ScheduleRefresh(detail)
|
||||
if detail then refreshDetail = true end
|
||||
if refreshPending then return end
|
||||
refreshPending = true
|
||||
local function Run()
|
||||
refreshPending = false
|
||||
local wantDetail = refreshDetail
|
||||
refreshDetail = false
|
||||
if not f:IsShown() then return end
|
||||
RefreshList()
|
||||
if wantDetail and (kind == "units" or kind == "objects") and selected and detailMissing then
|
||||
ShowDetail()
|
||||
end
|
||||
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()
|
||||
dirty = true
|
||||
dataVersion = dataVersion + 1
|
||||
if f:IsShown() then
|
||||
RefreshList()
|
||||
ScheduleRefresh(false)
|
||||
end
|
||||
end, f)
|
||||
FW:On("CODEX_ITEMS_LOADED", function()
|
||||
dataVersion = dataVersion + 1
|
||||
if f:IsShown() and (kind == "items" or kind == "units" or kind == "objects") then
|
||||
RefreshList()
|
||||
if (kind == "units" or kind == "objects") and selected and detailMissing then
|
||||
ShowDetail()
|
||||
end
|
||||
ScheduleRefresh(true)
|
||||
end
|
||||
end, f)
|
||||
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ local MIN_UNITS = 3 -- weniger normale Kreaturen: "zu wenig Daten"
|
||||
local LEVEL_SHARE = 0.05 -- Mindestanteil einer Stufe am Gewicht, damit sie zur typischen Spanne gehoert
|
||||
local WEIGHT_CAP = 30 -- eine haeufig gesehene Kreatur zaehlt hoechstens so viel
|
||||
local MAP_SHARE = 0.10 -- Karte zaehlt fuer eine Kreatur erst ab diesem Anteil ihrer Sichtungen
|
||||
local CACHE_SECS = 5
|
||||
local CACHE_SECS = 60 -- die Berechnung geht ueber alle kreaturen (mehrere 100 ms, viel Muell): selten neu
|
||||
|
||||
local cache, cacheAt, dirty = nil, 0, true
|
||||
|
||||
|
||||
@@ -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.171
|
||||
## Version: 0.1.172
|
||||
## Dependencies: Freewood-OctoWoW-Core
|
||||
## OptionalDeps: Freewood-OctoWoW-CodexData, Freewood-OctoWoW-ForeverData
|
||||
|
||||
|
||||
Reference in New Issue
Block a user