Getting Started with Spells
Registering Your Spellbook
After setting up your project, you'll need to register your spells with Aurora's spell system. This creates a centralized spellbook for your class that can be easily accessed throughout your code.
-- Create your spells
local NewSpell = Aurora.SpellHandler.NewSpell
Aurora.SpellHandler.PopulateSpellbook({
spells = {
AutoAttack = NewSpell(6603),
Charge = NewSpell(100),
ShieldSlam = NewSpell(23922),
Ravager = NewSpell(228920, { radius = 8,}),
},
auras = {
--Add Auras here
},
talents = {
--Add Talents here
},
}, "WARRIOR",3,"YourNamespace")
The 3 represents the Spec ID, and the "YourNamespace" is the name of your Project.
tip
See the Spell Overview for detailed information about creating and configuring spells.
Accessing Your Spells
Once registered, you can access your spells from anywhere in your code:
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
If you would Play a Discipline Priest, you would use the following code:
local spells = Aurora.SpellHandler.Spellbooks.priest["1"].YourNamespace.spells
local auras = Aurora.SpellHandler.Spellbooks.priest["1"].YourNamespace.auras
local talents = Aurora.SpellHandler.Spellbooks.priest["1"].YourNamespace.talents
Best Practices
- Keep Spellbook in Separate File
Create a dedicated file (e.g.,
Spellbook.lua
) for your spell definitions:
Next Steps
Once you have your spellbook set up, you can:
- Learn about spell configuration options
- Explore available spell methods
- Implement your rotation logic using the registered spells