Greetings.
I am working with Mangos Zero. I am using the database found here: https://github.com/TheLuda/mangos-zero-database. It has been brought to my attention that Warlock's Shadow Mastery does not affect DoTs such as Curse of Agony. After some debugging, I believe this is because there is no corresponding spell_affect entry in the database. I don't have much knowledge of mangos, nor of the database structure (both SQL and DBC) it uses. I do however have a fairly strong programming background, which means I think I know the problem but I cannot explain my reasoning .
I had thought that to solve the problem I need only add the following to the SQL db:
This would cause the family mask value of 12884993161 (the same mask used by effect 0, which is the effect value used by Shadow Bolt) to be set for effect 1, which is the effect value used by Curse of Agony. Note that when I attach a debugger to the mangosd process and modify these values manually internally, the talent IS applied to Curse of Agony.
Now, when I did this and issued a reload spell_affect command in the mangosd console, I received the following error:
Looking at the code, I see that the value retrieved from the database is compared to the value retrieved from the Spells.dbc file. Specifically, the "EffectItemType" fields. Note that the error log is base one, so EffectItemType2 refers to the second EffectItemType[] value. I modified the above output to show me the read values of the SQL database as well as the DBC file. My amended output is as follows (where the first value is the value from the DBC, and the second is the value from the SQL DB):
Note that 12884993161 cast to a 32 bit integer yields a value of 91273.
So, this leads me to conclude that simply inserting the previously mentioned rows into the SQL db is NOT the proper solution, as there is a sanity check in place to ensure these values conform to the DBC. So my question is...
What is the proper solution?
Edit: As requested by Vladimir on IRC, the proper mask value to insert into the DB is obtained as follows:
Corruption = 0x000000002
Curse of Agony = 0x000000400
Death Coil = 0x000080000
Drain Life = 0x000000008
Siphon Life = 0x100000000
The composition of these yields a value of (I believe) 0x10008040A.
Edit 2: The updated inserts are as follows (4295492618 is the decimal equivalent of 0x10008040A):