Jump to content

[patch] Use DBC spell bonus data


Guest qsa

Recommended Posts

Hello,

Fields 229-231 in spell.dbc hold spell bonus data since 3.2.0

This patch loads this data instead/in addition to the data in spell_bonus_data table.

Entries in spell_bonus_data table will override the default DBC data.

NOTES:

1) The patch uses existing mSpellBonusMap to load the DBC data into instead of more logical solution of directly using the data from sSpellStore.

Why? much simpler and centralized code. There are not that many spells anyway.

2) DBC provide us data per-effect, while mangos spell system assumes bonuses are per-spell. I guess we'll have to change it someday. Not directly related to the patch.

It works since so far there are no spells with two or more dots/direct effects.

3) Those fields hold only spell bonus data, no AP bonuses. Therefore we still need spell_bonus_data table for some spells and overrides.

4) At the moment mangos loads only first rank of the spell and assigns same bonus to all ranks, this is wrong. Different ranks may have different bonuses. eg: healing touch ( most 10+rank spells actually).

Data loaded from DBC will properly load the bonuses for different ranks, while data loaded from spell_bonus_data will work as it does now.

5) For now, NPC spells are NOT loaded. Do we need this data?

Can be enabled by commenting line 44 in patch.

6) sql cleanup added for redudndant data in spell_bonus_data table - most of entries in there. Simply since the data provided by DBC is accurate and mostly complete.

TODO: properly test, we may have problems with some hardcoded bonuses for spells.

diff against revision 10408

patch : http://paste2.org/p/969586

sql cleanup : http://paste2.org/p/969587

Testing, remarks and suggestions are always welcome/needed :)

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use