Registering Your Rotation
After setting up your spellbook and callbacks, you'll need to register your rotation with Aurora. This tells the framework what functions to call during combat.
Basic Structure
-- Get commonly used units
local target = Aurora.UnitManager:Get("target")
local player = Aurora.UnitManager:Get("player")
-- Get your spellbook
local spells = Aurora.SpellHandler.Spellbooks.warrior["3"].YourNamespace.spells
local auras = Aurora.SpellHandler.Spellbooks.warrior["3"].YourNamespace.auras
local talents = Aurora.SpellHandler.Spellbooks.warrior["3"].YourNamespace.talents
-- Define your combat rotation
local function Dps()
if spells.ShieldBlock:execute() then return true end
if spells.Ravager:execute() then return true end
if spells.AutoAttack:execute() then return true end
if spells.ShieldCharge:execute() then return true end
if spells.ShieldSlam:execute() then return true end
if spells.ThunderClap:execute() then return true end
if spells.Execute:execute() then return true end
if spells.Revenge:execute() then return true end
if spells.HeroicThrow:execute() then return true end
return false
end
-- Define out of combat actions
local function Ooc()
-- Add your out of combat logic here
end
-- Register the rotation
Aurora:RegisterRoutine(function()
-- Skip if player is dead or eating/drinking
if player.dead or player.aura("Food") or player.aura("Drink") then return end
-- Run appropriate function based on combat state
if player.combat then
Dps()
else
Ooc()
end
end, "WARRIOR", 3, "YourNamespace")
Parameters Explained
The RegisterRoutine function takes these parameters:
- Function - Your rotation logic
- Class - Your class in uppercase (e.g., "WARRIOR", "PRIEST")
- Spec - The specialization ID (e.g., 3 for Protection)
- Namespace - Your project's namespace
Best Practices
Organization
- Keep your rotation logic clean and organized
- Use separate functions for different aspects (DPS, healing, utility)
- Check important conditions first (dead, eating/drinking)
- Return true when an action is taken
Common Patterns
Basic Combat Check
if player.combat then
if Dps() then return end
else
if Ooc() then return end
end
Skip Conditions
if player.dead or player.aura("Food") or player.aura("Drink") then return end
Action Priority
local function Dps()
-- Defensive cooldowns first
if spells.ShieldBlock:execute() then return true end
-- Then major cooldowns
if spells.Ravager:execute() then return true end
-- Then regular rotation
if spells.ShieldSlam:execute() then return true end
if spells.ThunderClap:execute() then return true end
return false
end
Next Steps
- Learn about Callbacks for spell-specific logic
- Explore Unit Properties for more conditions
- Study Spell Methods for all available spell actions