From 4329f0603adeb0b44de3dfd36951d23ffa1ba8cc Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Tue, 1 Sep 2026 14:29:11 +0200 Subject: [PATCH] Normalize cache after realm resolution --- libs/libunitscan.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/libunitscan.lua b/libs/libunitscan.lua index f92aed6..777c057 100644 --- a/libs/libunitscan.lua +++ b/libs/libunitscan.lua @@ -169,8 +169,9 @@ local function MigrateLegacyPlayerCaches(playerdb, realmdb, realm) -- Normally this is a one-time migration. Still check both legacy sources: -- the first global-cache test may become available after an earlier cache -- lookup, and must not be postponed until PLAYER_LOGOUT. - if cacheMigrationDone and not perCharacterPlayers and - not (oldGlobalPlayers and next(oldGlobalPlayers)) + if cacheMigrationDone and normalizedRealm == realm + and not perCharacterPlayers + and not (oldGlobalPlayers and next(oldGlobalPlayers)) then return end