Normalize existing shared player cache
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user