Skip to content

Commit

Permalink
Module - Fix for nil from recent setting change.
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteOne committed May 19, 2024
1 parent 2c62f15 commit 16dcb81
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions System/API/Module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,25 @@ br.api.module = function(self)
-- @string option Name of the option to check.
-- @string["Check"|"Value"] optionType Type of option check to perform
local function getOption(option, optionType)
if optionType == "Check" then
return br.data.settings[br.selectedSpec][br.selectedProfile]["Rotation Options"][option] ~= nil and
ui.checked(option, "Rotation Options") or
ui.checked(option, "Base Options")
end
if optionType == "Value" then
return br.data.settings[br.selectedSpec][br.selectedProfile]["Rotation Options"][option] ~= nil and
ui.value(option, "Rotation Options") or
ui.value(option, "Base Options")
if br.data.settings[br.selectedSpec][br.selectedProfile]["Rotation Options"] == nil then
if optionType == "Check" then return ui.checked(option, "Base Options") end
if optionType == "Value" then return ui.value(option, "Base Options") end
else
if optionType == "Check" then return ui.checked(option, "Rotation Options") end
if optionType == "Value" then return ui.value(option, "Rotation Options") end
end
-- if optionType == "Check" then
-- return br.data.settings[br.selectedSpec][br.selectedProfile]["Rotation Options"][option] ~= nil and
-- ui.checked(option, "Rotation Options") or
-- ui.checked(option, "Base Options")
-- end
-- if optionType == "Value" then
-- return br.data.settings[br.selectedSpec][br.selectedProfile]["Rotation Options"][option] ~= nil and
-- ui.value(option, "Rotation Options") or
-- ui.value(option, "Base Options")
-- end
-- if optionType == "Check" then return false end
-- if optionType == "Value" then return 0 end
end

--- Auto Put Keystone into Receptable during mythic+ dungeons. | Kinky BR Module Code example
Expand Down

0 comments on commit 16dcb81

Please sign in to comment.