Normalize existing shared player cache

This commit is contained in:
Dusk-92
2026-09-01 14:26:52 +02:00
parent efd8e48778
commit a5b4d21f55
+11
View File
@@ -89,6 +89,13 @@ local function NormalizePlayerData(data)
end
end
local function NormalizePlayerTable(playerdb)
if type(playerdb) ~= "table" then return end
for _, data in pairs(playerdb) do
NormalizePlayerData(data)
end
end
local function MergePlayerTable(target, source)
if type(source) ~= "table" or source == target then return end
@@ -207,6 +214,10 @@ local function MigrateLegacyPlayerCaches(playerdb, realmdb, realm)
realmdb.players_cleanup = time()
end
-- Also clean presentation fields left by earlier revisions of this test
-- branch that already wrote directly into ShaguTweaks_player_cache.
NormalizePlayerTable(playerdb)
cacheMigrationDone = true
end