0.1.146: Karten-ID-Suche auch ausserhalb des Scans, Startdaten Karten-Scan und Item-Werte

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-27 14:36:37 +01:00
co-authored by Claude Sonnet 5.5
parent 35ea870ea2
commit 384097e987
3 changed files with 19 additions and 6 deletions
+12
View File
@@ -77,6 +77,18 @@ local function MergeExtras(g)
FillTable(db.cat.qd, g.extra.qd, function(k, v) return IsId(k) and type(v) == "table" end)
if Codex.Catalog then Codex.Catalog.rev = (Codex.Catalog.rev or 0) + 1 end
end
-- Karten-Scan (Karten, Gebiete, Gebiete je Karte, Trigger, Flugpunkte): nur fehlende Eintraege, eigener Scan geht vor
if type(g.extra.scan) == "table" then
db.cat = db.cat or {}
for _, name in ipairs({ "m", "a", "ma", "t", "x" }) do
if type(g.extra.scan[name]) == "table" then
db.cat[name] = db.cat[name] or {}
FillTable(db.cat[name], g.extra.scan[name], function(k, v)
return type(k) == "number" and (type(v) == "string" or type(v) == "table")
end)
end
end
end
db.foreverRev = g.rev
end
+6 -5
View File
@@ -132,7 +132,7 @@ function API.CurrentMapID(cands)
end
end
-- Zone ohne bekannte Daten (und noch nie betreten): Karten-ID ueber den Zonennamen suchen.
-- Quelle: der Karten-Scan (db.cat.m), sonst alle Nummern 1..8000 durchprobieren. Ergebnis wird gemerkt (auch dauerhaft),
-- Quelle: zuerst der Karten-Scan (db.cat.m), dann alle Nummern 1..8000 durchprobieren. Ergebnis wird gemerkt (auch dauerhaft),
-- ein Fehlschlag fuer 60 Sekunden.
local now = _G.GetTime and _G.GetTime() or 0
if API.noMatch and API.noMatch[key] and now - API.noMatch[key] < 60 then return nil end
@@ -144,12 +144,13 @@ function API.CurrentMapID(cands)
if target then
local ids = {}
local m = Codex.db and Codex.db.cat and Codex.db.cat.m
if type(m) == "table" and next(m) then
for id in pairs(m) do if type(id) == "number" then ids[#ids + 1] = id end end
-- erst die Karten aus dem Scan (schnell), dann der ganze Bereich: der Scan kennt nicht jede Karte (z. B. Blackstone Island)
local seen = {}
if type(m) == "table" then
for id in pairs(m) do if type(id) == "number" then ids[#ids + 1] = id; seen[id] = true end end
table.sort(ids)
else
for id = 1, 8000 do ids[#ids + 1] = id end
end
for id = 1, 8000 do if not seen[id] then ids[#ids + 1] = id end end
for i = 1, #ids do
local id = ids[i]
if Norm(MapName(id)) == target then
+1 -1
View File
@@ -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.145
## Version: 0.1.146
## Dependencies: Freewood-OctoWoW-Core
## OptionalDeps: Freewood-OctoWoW-CodexData, Freewood-OctoWoW-ForeverData