Skip to content

Commit

Permalink
Fixed an old error when clicking on a plugin icon in the title bar wh…
Browse files Browse the repository at this point in the history
…ile showing the deaths display.
  • Loading branch information
Tercioo committed Oct 11, 2024
1 parent 0b45d40 commit 9959c82
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions frames/window_breakdown/window_playerbreakdown.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ function breakdownWindowFrame.ShowPluginOnBreakdown(pluginObject, button)
if (actorObject) then
local instanceObject = Details:GetInstance(1)
if (instanceObject) then
Details:OpenBreakdownWindow(instanceObject, actorObject)
local bFromAttributeChange = false
local bIsRefresh = false
local bIsShiftKeyDown = false
local bIsControlKeyDown = false
local bIgnoreOverrides = true
Details:OpenBreakdownWindow(instanceObject, actorObject, bFromAttributeChange, bIsRefresh, bIsShiftKeyDown, bIsControlKeyDown, bIgnoreOverrides)
end
end
end
Expand Down Expand Up @@ -340,7 +345,8 @@ end
---@param bIsRefresh boolean|nil
---@param bIsShiftKeyDown boolean|nil
---@param bIsControlKeyDown boolean|nil
function Details:OpenBreakdownWindow(instanceObject, actorObject, bFromAttributeChange, bIsRefresh, bIsShiftKeyDown, bIsControlKeyDown)
---@param bIgnoreOverrides boolean|nil
function Details:OpenBreakdownWindow(instanceObject, actorObject, bFromAttributeChange, bIsRefresh, bIsShiftKeyDown, bIsControlKeyDown, bIgnoreOverrides)
---@type number, number
local mainAttribute, subAttribute = instanceObject:GetDisplay()

Expand All @@ -353,17 +359,19 @@ function Details:OpenBreakdownWindow(instanceObject, actorObject, bFromAttribute

Details:SetWindowColor(unpack(Details.frame_background_color))

if (not Details.row_singleclick_overwrite[mainAttribute] or not Details.row_singleclick_overwrite[mainAttribute][subAttribute]) then
Details:CloseBreakdownWindow()
return

elseif (type(Details.row_singleclick_overwrite[mainAttribute][subAttribute]) == "function") then
if (bFromAttributeChange) then
if (not bIgnoreOverrides) then
if (not Details.row_singleclick_overwrite[mainAttribute] or not Details.row_singleclick_overwrite[mainAttribute][subAttribute]) then
Details:CloseBreakdownWindow()
return

elseif (type(Details.row_singleclick_overwrite[mainAttribute][subAttribute]) == "function") then
if (bFromAttributeChange) then
Details:CloseBreakdownWindow()
return
end
Details.row_singleclick_overwrite[mainAttribute][subAttribute](_, actorObject, instanceObject, bIsShiftKeyDown, bIsControlKeyDown)
return
end
Details.row_singleclick_overwrite[mainAttribute][subAttribute](_, actorObject, instanceObject, bIsShiftKeyDown, bIsControlKeyDown)
return
end

if (instanceObject:GetMode() == DETAILS_MODE_RAID) then
Expand Down

0 comments on commit 9959c82

Please sign in to comment.