mirror of
https://github.com/Lacustat/Freewood-OctoWoW-Codex.git
synced 2026-10-31 02:16:55 +00:00
Freewood-OctoWoW-Codex 0.1.137
Einmalige Bereinigung fremder Wegzellen entfernt. 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
d3c46dc9cb
commit
09a0fe1ce1
@@ -1089,33 +1089,6 @@ if frame then
|
||||
end)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- Einmalige Bereinigung: fremde Wege aus frueheren Startdaten (Original-Freewood) stammen nicht von Octo-Spielern
|
||||
-- und blieben im gespeicherten Datenbestand liegen. Empfangene Wege kommen beim naechsten Sync wieder.
|
||||
------------------------------------------------------------------------
|
||||
|
||||
function Path.CleanOld()
|
||||
local db = Codex.db
|
||||
if not db or db.pathCleanV1 then return end
|
||||
db.pathCleanV1 = true
|
||||
local n = db.pathrCount or 0
|
||||
if n > 0 and Codex.Share and Codex.Share.ClearRemote then
|
||||
Codex.Share.ClearRemote()
|
||||
FW:Print(string.format(FW.L.CODEX_PATH_CLEANED, n))
|
||||
FW:Fire("CODEX_CHANGED", "import")
|
||||
FW:Fire("CODEX_SYNC_CHANGED")
|
||||
end
|
||||
end
|
||||
|
||||
local cleaner = _G.CreateFrame and _G.CreateFrame("Frame")
|
||||
if cleaner then
|
||||
cleaner:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||
cleaner:SetScript("OnEvent", function(self)
|
||||
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
|
||||
if _G.C_Timer and _G.C_Timer.After then _G.C_Timer.After(20, function() pcall(Path.CleanOld) end) end
|
||||
end)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------
|
||||
-- /fwpos: Diagnose (Position, Hoehe, Zustand, Auren) und Ein/Aus
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user