Jump to content

How can DBC glitches be avoided?


Alex

Recommended Posts

Hmm... studying MaNGOS code I cannot find how DBC glitches can be avoided (DBC is not a source to be fully trusted).

One day there was effort to translate DBCs into database and use them that way, but if I remember correctly this was rejected.

Let's explain. Spells 47702, 47722, 50251 must have target type 38 (SCRIPT_TARGET) because they can only target specific creatures. In Spell.dbc they have target type 25, that is duel player target which is incorrect so they can be applied to any creature and that is wrong.

So the question: maybe someone knows how to correct such a DBC glitch in MaNGOS code without making dirty hacks? Or maybe making DBC->SQL transition is worth the effort (I may try to do it then)?

Link to comment
Share on other sites

you can just edit the dbc.. there are lots of dbc editors around. But then you need to reedit it after each wow version change. Other way would be in core to have method that is called after each dbc load where you can overwrite values. I think wcell does it this way ( http://wiki.wcell.org/index.php/API:Spells#How_to_fix_Spell_and_Aura_behavior ) but they do it way more OO if you ask me; so in mangos case dunno what philosophy would be, maybe just hardcoded core fixes.

Link to comment
Share on other sites

Okay, I do think some DBC override table may be needed. Like dbc_override with fields like dbc, entry, field, value. It may be flexible enough to do necessary changes without resorting to DBC hacking. Will implement this soon.

Link to comment
Share on other sites

there is a OverrideSpellData.dbc already, duno if its porpuse is what you mean.

but an easy way to "fix" dbc data is to add a function call right after dbc files load with the following:

void RunSpellFixesDBC()
{
   SpellEntry *sp;
   sp = const_cast<SpellEntry*>(sSpellStore.LookupEntry(47702));  //spell entry you want to modify
   sp->EffectImplicitTarget[0] = TARGET_SCRIPT; //the modification you want to do
   // and so on..
}

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