|
|
|
@ -7,35 +7,29 @@ local IcyVeins = Bastion.SpellBook:GetSpell(12472) |
|
|
|
|
local FrozenOrb = Bastion.SpellBook:GetSpell(84714) |
|
|
|
|
local Blizzard = Bastion.SpellBook:GetSpell(190356) |
|
|
|
|
|
|
|
|
|
local FrostOptions = { |
|
|
|
|
CdsEnabled = false, |
|
|
|
|
FrozenOrbEnabled = false, |
|
|
|
|
AutoAOE = true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Bastion.ToggleManager:Add({ |
|
|
|
|
id = 'Frost_CdsEnabled', |
|
|
|
|
icon = IcyVeins:GetIcon(), |
|
|
|
|
state = FrostOptions.CdsEnabled |
|
|
|
|
state = false |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
Bastion.ToggleManager:Add({ |
|
|
|
|
id = 'Frost_FrozenOrbEnabled', |
|
|
|
|
icon = FrozenOrb:GetIcon(), |
|
|
|
|
state = FrostOptions.FrozenOrbEnabled |
|
|
|
|
state = false |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
Bastion.ToggleManager:Add({ |
|
|
|
|
id = 'Frost_AutoAOE', |
|
|
|
|
icon = Blizzard:GetIcon(), |
|
|
|
|
state = FrostOptions.AutoAOE |
|
|
|
|
state = true |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
---@alias GetFrostOption fun(option: "CdsEnabled" | "FrozenOrbEnabled" | 'AutoAOE'): boolean |
|
|
|
|
|
|
|
|
|
---@type GetFrostOption |
|
|
|
|
local function GetFrostOption(option) |
|
|
|
|
return FrostOptions[option] |
|
|
|
|
return Bastion.ToggleManager:GetState("Frost_" .. option) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
local Command = Bastion.Command:New('frost') |
|
|
|
@ -46,10 +40,20 @@ end) |
|
|
|
|
|
|
|
|
|
Command:Register('cds', 'Toggle bastion on/off', function() |
|
|
|
|
Bastion.ToggleManager:Toggle("Frost_CdsEnabled") |
|
|
|
|
|
|
|
|
|
if GetFrostOption("FrozenOrbEnabled") and not GetFrostOption("CdsEnabled") then |
|
|
|
|
Bastion.ToggleManager:Toggle("Frost_FrozenOrbEnabled") |
|
|
|
|
elseif not GetFrostOption("FrozenOrbEnabled") and GetFrostOption("CdsEnabled") then |
|
|
|
|
Bastion.ToggleManager:Toggle("Frost_FrozenOrbEnabled") |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
Command:Register('orb', 'Toggle bastion on/off', function() |
|
|
|
|
Bastion.ToggleManager:Toggle("Frost_FrozenOrbEnabled") |
|
|
|
|
|
|
|
|
|
if not GetFrostOption("FrozenOrbEnabled") and GetFrostOption("CdsEnabled") then |
|
|
|
|
Bastion.ToggleManager:Toggle("Frost_CdsEnabled") |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
return GetFrostOption |