Skip to content

Commit

Permalink
Fixing raid debuffs options bug: crash opening options when load opti…
Browse files Browse the repository at this point in the history
…ons on demand toggle is disabled (ticket #967).
  • Loading branch information
michaelnpsp committed May 13, 2021
1 parent 60481e4 commit ff33fe8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions RaidDebuffsOptions/OptionsGeneral.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ options.separator0 = { type = "description", order = 9, name = "\n" }
do
local statusOptions = {
type = 'group', inline = true,
name = function(info) return RDO.statusesNames[info.handler] end,
hidden = function(info) return info.handler>#RDO.statuses end,
name = function(info) return RDO.statusesNames[info.handler[1]] end,
hidden = function(info) return info.handler[1]>#RDO.statuses end,
args = {
color = {
type = "color",
Expand All @@ -28,11 +28,11 @@ do
name = L['color'],
hasAlpha = true,
get = function(info)
local c = RDO.statuses[info.handler].dbx.color1
local c = RDO.statuses[info.handler[1]].dbx.color1
return c.r, c.g, c.b, c.a
end,
set = function(info, r,g,b,a)
local c = RDO.statuses[info.handler].dbx.color1
local c = RDO.statuses[info.handler[1]].dbx.color1
c.r, c.g, c.b, c.a = r, g, b, a
end,
},
Expand All @@ -43,10 +43,10 @@ do
name = L["multiple icons support"],
desc = L["Enable multiple icons support for icons indicators."],
get = function(info)
return RDO.statuses[info.handler].dbx.enableIcons
return RDO.statuses[info.handler[1]].dbx.enableIcons
end,
set = function(info, v)
local status = RDO.statuses[info.handler]
local status = RDO.statuses[info.handler[1]]
status.dbx.enableIcons = v or nil
if status.enabled then
status:OnDisable()
Expand All @@ -57,11 +57,11 @@ do
},
} }
local meta = { __index = statusOptions }
options.status1 = setmetatable( { order = 10 , handler=1 }, meta )
options.status2 = setmetatable( { order = 11 , handler=2 }, meta )
options.status3 = setmetatable( { order = 12 , handler=3 }, meta )
options.status4 = setmetatable( { order = 13 , handler=4 }, meta )
options.status5 = setmetatable( { order = 14 , handler=5 }, meta )
options.status1 = setmetatable( { order = 10 , handler= {1} }, meta )
options.status2 = setmetatable( { order = 11 , handler= {2} }, meta )
options.status3 = setmetatable( { order = 12 , handler= {3} }, meta )
options.status4 = setmetatable( { order = 13 , handler= {4} }, meta )
options.status5 = setmetatable( { order = 14 , handler= {5} }, meta )
end

options.newStatus = {
Expand Down

0 comments on commit ff33fe8

Please sign in to comment.