Bastion aims to serve as a highly performant, simplisitic, and expandable World of Warcraft data visualization framework.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Bastion/scripts/fire.lua

54 lines
1.1 KiB

2 years ago
local
Tinkr,
---@type Bastion
Bastion = ...
local FireModule = Bastion.Module:New('fire')
local Player = Bastion.UnitManager:Get('player')
local Target = Bastion.UnitManager:Get('target')
local None = Bastion.UnitManager:Get('none')
local AutoAttack = Bastion.SpellBook:GetSpell(6603)
local CDsEnabled = false
local Command = Bastion.Command:New('fire')
Command:Register('cooldowns', 'Toggle Fire CDs', function()
CDsEnabled = not CDsEnabled
Bastion:Print('Fire Cooldowns ' .. (CDsEnabled and 'enabled' or 'disabled'))
end)
---@return boolean
local function CombatRotation()
return false
end
---@return boolean
local function OutOfCombatRotation()
return false
end
local isRunning = false
FireModule:Sync(function()
if not isRunning then
Bastion:Print('Fire Started')
isRunning = true
end
if not Player:IsAlive() or Player:IsMounted() then
return false
end
if Player:IsAffectingCombat() or IsCurrentSpell(AutoAttack:GetID()) then
-- Combat Rotation
return CombatRotation()
else
-- Out Of Combat Rotation
return OutOfCombatRotation()
end
end)
Bastion:Register(FireModule)