diff --git a/EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua b/EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua index f86dcffa..afda1668 100644 --- a/EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua +++ b/EllesmereUIRaidFrames/EllesmereUIRaidFrames.lua @@ -7732,7 +7732,8 @@ XF.EnsureBuilt = function(count) elseif event == "UNIT_THREAT_LIST_UPDATE" or event == "UNIT_THREAT_SITUATION_UPDATE" then local d = GetFFD(b) if d.threatFrame then - local bs = db.profile.threatBorderSize or 0 + local s = d._isExtra and ns._scaledExtraProxy or ns._scaledProfile + local bs = s.threatBorderSize or 0 if bs > 0 then local status = UnitThreatSituation(unit) if status and THREAT_ACTIVE[status] and PP then @@ -10297,7 +10298,8 @@ local function OnEvent(self, event, arg1, ...) if btn then local d = GetFFD(btn) if d.threatFrame then - local bs = db.profile.threatBorderSize or 0 + local s = d._isParty and ns._scaledPartyProxy or (d._isExtra and ns._scaledExtraProxy) or ns._scaledProfile + local bs = s.threatBorderSize or 0 if bs > 0 then local status = UnitThreatSituation(arg1) if status and THREAT_ACTIVE[status] and PP then @@ -10539,6 +10541,8 @@ do "customBgColor", "bgClassColored", "bgDarkness", "smoothBars", "healPrediction", "healPredOpacity", "healPredColor", "healthVerticalFill", + -- Drawn as "Threat Borders" on the Health Bar row, so it files here. + "threatBorderSize", }, absorbs = { "absorbStyle", "absorbOpacity", "absorbColor", "absorbEdgeMode", "showOvershield", @@ -10578,7 +10582,7 @@ do "borderBehind", "borderTextureOffset", "borderTextureOffsetY", "borderTextureShiftX", "borderTextureShiftY", "hoverBorderEnabled", "hoverBorderSize", "hoverBorderColor", "hoverBorderAlpha", - "targetBorderEnabled", "targetBorderSize", "targetBorderColor", "targetBorderAlpha", "threatBorderSize", + "targetBorderEnabled", "targetBorderSize", "targetBorderColor", "targetBorderAlpha", }, dispels = { "dispelBorderSize", "dispelOverlay", "dispelOverlayOpacity", "dispelShowAll", diff --git a/EllesmereUI_Migration.lua b/EllesmereUI_Migration.lua index 553a8134..3cb57a25 100644 --- a/EllesmereUI_Migration.lua +++ b/EllesmereUI_Migration.lua @@ -4356,3 +4356,46 @@ EllesmereUI.RegisterMigration({ if type(p) == "table" then p.showCastTarget = false end end, }) + +-------------------------------------------------------------------------------- +-- Raid Frames: threatBorderSize moved party-sync sections +-- +-- The "Threat Borders" slider is drawn on the Health Bar row but the key was +-- filed under the Indicators party-sync section, so editing it on the Party +-- tab wrote the shared raid value. The key now files under "healthBar", which +-- matches where its control lives. +-- +-- Writing party_threatBorderSize through the UI required both sections custom, +-- but the legacy showThreat -> slider conversion writes it directly, bypassing +-- that gate. So the override can be live under one mapping and dormant under +-- the other, in either direction. Clear it whenever that state would flip: in +-- the flip-to-live case that preserves exactly what party renders today, and +-- in the flip-to-dormant case party inherits raid either way while clearing +-- stops the value reviving later. An override live under BOTH mappings (the +-- normal both-custom case) is left untouched. +-------------------------------------------------------------------------------- +EllesmereUI.RegisterMigration({ + id = "rf_threat_border_party_section_v2", + scope = "profile", + description = "Clear a party threat border override whose live/dormant state would flip when threatBorderSize moved to the Health Bar sync section.", + body = function(ctx) + local rf = ctx.profile.addons and ctx.profile.addons.EllesmereUIRaidFrames + if type(rf) ~= "table" then return end + -- Consume the legacy party conversion HERE. ERF:OnInitialize performs + -- the same rewrite, but child addons initialize after the parent's + -- ADDON_LOADED, so deferring to it would let a dormant 0 land after + -- this body had already decided and stamped. Clearing the flag makes + -- that later block a no-op; the raid showThreat key is untouched. + if rf.party_showThreat ~= nil then + if rf.party_showThreat == false then rf.party_threatBorderSize = 0 end + rf.party_showThreat = nil + end + if rf.party_threatBorderSize == nil then return end + local ss = type(rf.partySyncSections) == "table" and rf.partySyncSections or nil + local wasLive = (ss and ss.indicators == false) and true or false + local willBeLive = (ss and ss.healthBar == false) and true or false + if wasLive ~= willBeLive then + rf.party_threatBorderSize = nil + end + end, +})