[8169] Implement new optional table spell_check and console command .debug spellcheck

* Table expected to be store data mirror same data in code:
  - explicit spell ids with related expected spell properties like effects, spell family or auras
  - implicit requirements for select some spell sets like spell family masks, icons or visual values
* For check can be used .debug spellcheck _console_ only command.
* Main purpose table and related command check code parts for outdated data at client switch.
  It also can be used for check data in patch writing time to be sure code correctness.
This commit is contained in:
VladimirMangos 2009-07-12 22:02:33 +04:00
parent 3b47b66ba9
commit f99f477fe8
8 changed files with 327 additions and 17 deletions

View file

@ -431,10 +431,10 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
return 0;
}
if (!spellProto || !IsAuraAddedBySpell(SPELL_AURA_MOD_FEAR, spellProto->Id))
if (!spellProto || !IsSpellHaveAura(spellProto,SPELL_AURA_MOD_FEAR))
pVictim->RemoveSpellbyDamageTaken(SPELL_AURA_MOD_FEAR, damage);
// root type spells do not dispel the root effect
if (!spellProto || !(spellProto->Mechanic == MECHANIC_ROOT || IsAuraAddedBySpell(SPELL_AURA_MOD_ROOT, spellProto->Id)))
if (!spellProto || !(spellProto->Mechanic == MECHANIC_ROOT || IsSpellHaveAura(spellProto,SPELL_AURA_MOD_ROOT)))
pVictim->RemoveSpellbyDamageTaken(SPELL_AURA_MOD_ROOT, damage);
// no xp,health if type 8 /critters/