mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 22:26:22 +00:00
feat(Core/Spell): Implement ValidateSpellInfo (#4323)
* feat(Core/Spell): Implement ValidateSpellInfo * cherry-pick from2b5d7eef3a&a0a158b5b8* sLog->outError * cleanup * convert to ValidateSpellInfo * fix error log * improve sLog->outError * remove non related spells stuff from Validate * remove the last * build * build x2
This commit is contained in:
@@ -117,9 +117,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SHAZZRAH_GATE))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_SHAZZRAH_GATE });
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
|
||||
@@ -950,9 +950,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_WL_UNSTABLE_AFFL_DISPEL))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_WL_UNSTABLE_AFFL_DISPEL });
|
||||
}
|
||||
|
||||
void HandleDispel(DispelInfo* dispelInfo)
|
||||
|
||||
@@ -38,9 +38,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_TELEPORT_SINGLE) && !sSpellMgr->GetSpellInfo(SPELL_TELEPORT_SINGLE_IN_GROUP))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_TELEPORT_SINGLE, SPELL_TELEPORT_SINGLE_IN_GROUP });
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
|
||||
@@ -2236,9 +2236,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_INGEST))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_INGEST });
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
|
||||
Reference in New Issue
Block a user