From 8176b906dfa5356b22816ac0cfaaa9b2d57e6ac2 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:34:45 -0500 Subject: [PATCH] Re-anchor tradeskill merge bar to real craft starts EnterTradeskillMerge sized the merged bar as startMs + single*count, a zero-latency assumption. Each craft boundary actually costs a server round-trip, so the real chain runs ~(N-1)*lag longer than the bar assumed. At the clear the overall fill was clamped to full and looked done, but the fast per-craft spark tracks real time and came up short by the accumulated lag -- freezing partway on the final craft. StartTradeskillCraft now re-pins endTime to each craft's real start (remaining crafts each still take `single`), so on the last craft remaining==1 and endTime lands on its true completion. The spark and the overall progress now reach the right edge together. --- modules/castbar.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/castbar.lua b/modules/castbar.lua index 283c8515..ffbcaaf9 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -69,6 +69,11 @@ pfUI:RegisterModule("castbar", function () -- spark to the left edge of the bar. local function StartTradeskillCraft(cb) cb.currentCraftStart = GetTime() * 1000 + local remaining = cb.tradeskillTotal - (cb.tradeskillCompleted or 0) + cb.endTime = cb.currentCraftStart + cb.tradeskillSingleMs * remaining + local duration = (cb.endTime - cb.startTime) / 1000 + cb.bar:SetMinMaxValues(0, duration) + cb.lastMax = duration UpdateTradeskillLabel(cb) end