Hello,
Pre-Cataclysm Spell.dbc held a foreign key to to SpellEffect.dbc. After Cataclysm hit, Spell.dbc has now been made smaller (250~ down to 46 entries per row), and no longer holds this foreign key to SpellEffect.dbc; which makes it hard to look up what effects each spell applies.
Instead, now each row in SpellEffect.dbc holds a foreign key to Spell.dbc. There are also multiple rows in SpellEffect.dbc for each row in Spell.dbc, one row for each spell effect respectively (maximum of 3).
I thought about a few different approaches I could take in order to access spell effect data for each spell.
One, ugly approach was to parse SpellEffect.dbc against each spell stored in Spell.dbc upon initializing our code. This would be inefficient and just plain slow. So, I decided to find out how the game itself accessed SpellEffect.dbc, due to the nature of the database.
The function at 0x49C400 (not rebased) is called when the game is initializing, and it creates a map of spell id's to spell effects. I honestly didn't reverse this function for long since I couldn't be ****ed, but you can see the general gist of it if you look at it.
However, at 0x49B8D0 (also not rebased) there is a function that we can call to return a SpellEffect row. It takes in a spell id, and which SpellEffect index you want for that spell. If there isn't a SpellEffect for that index (0, 1, 2), it will return 0x0. Otherwise, it will return a pointer to the row.
I won't enclose any code here, because I don't want it to be tasty copy pasta, but all you need to know is here.
Enjoy
EDIT: I can't seem to find where EffectBasePoints has gone. Does anyone want to fill me in? For example, to get the speed of a mount.