How spells are stored and customised in VMaNGOS. Spell templates come from the client's
Spell.dbc; the world database's spell_* tables layer server-side behaviour on top of them.
This page maps out which table does what.
The Core: spell_template
The spell_template table mirrors and extends Spell.dbc for every
spell the server can cast: costs, cast times, cooldowns, effects (1-3), targets, visuals and
text ids. Most content work only touches DBC data; spell_template matters when you need to
change behaviour without touching the client.
| Table | Purpose |
|---|---|
spell_proc_event |
Defines when a proc-style spell triggers (on hit, on crit, on being hit, with which cooldown/family mask). |
spell_chain |
Spell rank chains: spell_id/prev_spell/first_spell relations and ranks (next rank derived from these). Drives "learn next rank" logic and downranking. |
spell_learn_spell |
Spells that auto-teach other spells when learned. |
spell_pet_auras |
Auras applied to the caster's pet when a spell is active. |
spell_elixir |
Classifies elixir auras via a mask as Battle/Guardian (both bits = flask) so the "one of each" rules work. |
spell_group + spell_group_stack_rules |
Groups auras and defines stacking behaviour between members. |
spell_threat |
Threat generated by casting a spell. |
spell_cone |
Cone width for cone-shaped target effects. |
spell_target_position |
Explicit destination coordinates for teleport/summon effects. |
spell_script_target |
Hard target requirements for scripted effect targets (specific creature/GO entries). |
spell_check |
Expected spell properties used by the .debug spellcheck command to validate spells against in-code assumptions. |
- Player/NPC casts →
Spell::prepare→ checks (range, cooldowns, costs, reagents, conditions where applicable). - Effect execution resolves implicit targets;
spell_target_position/spell_script_targetoverride where defined; cones usespell_cone. - Aura application consults
spell_group_stack_rules,spell_elixirandspell_pet_auras. - Procs roll through rules in
spell_proc_event; threat is added viaspell_threat.
- DB scripts:
spell_scriptsrun the generic script command set on spell events. - C++ scripts:
spell_template.script_name binds to handlers registered insrc/scripts/spellsfor behaviour too complex for tables.