Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 3.37 KB

File metadata and controls

61 lines (45 loc) · 3.37 KB

Spell System

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.


Behaviour Layers

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.

Casting Pipeline (simplified)

  1. Player/NPC casts → Spell::prepare → checks (range, cooldowns, costs, reagents, conditions where applicable).
  2. Effect execution resolves implicit targets; spell_target_position / spell_script_target override where defined; cones use spell_cone.
  3. Aura application consults spell_group_stack_rules, spell_elixir and spell_pet_auras.
  4. Procs roll through rules in spell_proc_event; threat is added via spell_threat.

Scripted Spells


Related Pages