I'd like to understand the spell system better...

Was wondering if some devs could give me some hints as to where to start learning the spell system. My goal is to fix some of the spell bugs under the pet category (and hopefully branch out from there) but I haven’t a clue where to even start.

For example this bug report (from a year ago) says Wolverine Bite is always available once learned however it should only be useable after a crit. Where would you start if you were looking into this?

As I poked around I came up with these questions:

[ul][li]Is this a broken spell in spell_dbc?[/li]
[li]Does this spell need data in spell_proc_event?[/li]
[li]Is this a broken mechanic in the Spell class?[/li]
[li]How does the core even activate spells after a crit?[/li]
[/ul]

Thanks in advance.

PS:

Even if the provided example is invalid (as in bug doesn’t exist anymore), it’s still a good example of a bug in general.

Usually, when I read the words “triggers”, “procs”, or the like, i inmediatly think about the spell_proc_event table, which holds…well… proc information about the spells.

Now, when it is something like that bug report, i usually think about the AuraStates, spells like DK’s Rune Strike, that are only usable after X, are usually handled with AuraStates, there’s an aurastate for pretty much everything out there, check it in the header files. Those spells have the CasterAuraState/TargetAuraState/AuraStateNot fields indicating which AuraState it is expecting.

@Subv

Thanks for the tips. I’m glad you gave an example since I forgot to ask for one. It will give me a place to start to see a working spell and work backward from it.