Skip to content

Commit

Permalink
Spec options from minimap dropdown will now use the proper set/get fu…
Browse files Browse the repository at this point in the history
…nctions (fixes WW FSK issue).
  • Loading branch information
Hekili committed Apr 3, 2020
1 parent d2295ea commit a299785
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Classes/MonkWindwalker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1365,8 +1365,8 @@ if UnitClassBase( 'player' ) == 'MONK' then
width = 1.5,
get = function () return not Hekili.DB.profile.specs[ 269 ].abilities.flying_serpent_kick.disabled end,
set = function ( _, val )
local a = Hekili.DB.profile.specs[ 269 ].abilities
Hekili.DB.profile.specs[ 269 ].abilities.flying_serpent_kick.disabled = not val end,
Hekili.DB.profile.specs[ 269 ].abilities.flying_serpent_kick.disabled = not val
end,
} )

spec:RegisterSetting( "optimize_reverse_harm", false, {
Expand Down
11 changes: 7 additions & 4 deletions UI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -511,15 +511,18 @@ do
text = setting.info.name,
func = function ()
menu.args[1] = setting.name
setting.info.set( menu.args, not Hekili.DB.profile.specs[ i ].settings[ setting.name ] )
setting.info.set( menu.args, not setting.info.get( menu.args ) )

if Hekili.DB.profile.notifications.enabled then
Hekili:Notify( setting.info.name .. ": " .. ( Hekili.DB.profile.specs[ i ].settings[ setting.name ] and "ON" or "OFF" ) )
Hekili:Notify( setting.info.name .. ": " .. ( setting.info.get( menu.args ) and "ON" or "OFF" ) )
else
self:Print( setting.info.name .. ": " .. ( Hekili.DB.profile.specs[ i ].settings[ setting.name ] and " |cFF00FF00ENABLED|r." or " |cFFFF0000DISABLED|r." ) )
self:Print( setting.info.name .. ": " .. ( setting.info.get( menu.args ) and " |cFF00FF00ENABLED|r." or " |cFFFF0000DISABLED|r." ) )
end
end,
checked = function () return Hekili.DB.profile.specs[ i ].settings[ setting.name ] end,
checked = function ()
menu.args[1] = setting.name
return setting.info.get( menu.args )
end,
hidden = function () return Hekili.State.spec.id ~= i end,
} )
end
Expand Down

0 comments on commit a299785

Please sign in to comment.