Fix: run the 1.3.4 trip-length repair after the saved data is loaded
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WyQKCL92ZLwPi9qmYQtNdc
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- The footer no longer names the route with the oldest data (the restart correction makes it unnecessary). It only appears after a server restart, while a route in the window has not been seen since.
|
||||
|
||||
### Fixed
|
||||
- The 1.3.4 one-time repair of saved trip lengths never actually ran (it ran before the game loaded the saved data), so copies used before 1.3.4 kept wrong trip lengths and drifted by up to a minute, e.g. Grom'gol about 45 seconds slow after 11 hours.
|
||||
- The settings window needed two right-clicks to open, and some checkboxes on a shared line (outline, sound) toggled their neighbour.
|
||||
- Window size, look, lock, position and the minimap icon's spot were not restored after logging in: they were applied before the game had loaded the saved settings.
|
||||
|
||||
|
||||
+5
-1
@@ -184,7 +184,10 @@ local OB_OK, OB_ERR = pcall(function ()
|
||||
-- One-time repair (1.3.4): restarts used to re-measure trip lengths from only a few
|
||||
-- trips, throwing away days of evidence. Restore the long-term values (built in now),
|
||||
-- count them as 700 trips of evidence, and recompute the restart offsets with them.
|
||||
if not DB.fix134 then
|
||||
-- Runs once the saved data is loaded (VARIABLES_LOADED below): this file runs before
|
||||
-- that, so a repair here alone would only touch a temporary empty table.
|
||||
local function Repair134()
|
||||
if DB.fix134 then return end
|
||||
for i = 1, table.getn(ROUTES) do
|
||||
local r = ROUTES[i]
|
||||
local e = r.entry
|
||||
@@ -1812,6 +1815,7 @@ local OB_OK, OB_ERR = pcall(function ()
|
||||
local f = CreateFrame("Frame")
|
||||
f:RegisterEvent("VARIABLES_LOADED")
|
||||
f:SetScript("OnEvent", function()
|
||||
Repair134()
|
||||
panel:SetScale(CFG.scale or 1)
|
||||
ApplyLook()
|
||||
if CFG.locked then grip:Hide() else grip:Show() end
|
||||
|
||||
Reference in New Issue
Block a user