mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 00:23:48 +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:
@@ -180,9 +180,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MARK_DAMAGE))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_MARK_DAMAGE });
|
||||
}
|
||||
|
||||
void OnPeriodic(AuraEffect const* aurEff)
|
||||
|
||||
@@ -358,9 +358,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MOUNTING_CHECK))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_MOUNTING_CHECK });
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
@@ -406,11 +404,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MOTIVATE_1))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MOTIVATE_2))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_MOTIVATE_1, SPELL_MOTIVATE_2 });
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
@@ -463,12 +457,16 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_BREW) || !sSpellMgr->GetSpellInfo(SPELL_GHOSTLY) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HEX1) || !sSpellMgr->GetSpellInfo(SPELL_HEX2) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HEX3) || !sSpellMgr->GetSpellInfo(SPELL_GROW) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_LAUNCH))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_BREW,
|
||||
SPELL_GHOSTLY,
|
||||
SPELL_HEX1,
|
||||
SPELL_HEX2,
|
||||
SPELL_HEX3,
|
||||
SPELL_GROW,
|
||||
SPELL_LAUNCH
|
||||
});
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
|
||||
@@ -316,9 +316,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_OOZE_ZAP))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_OOZE_ZAP });
|
||||
}
|
||||
|
||||
SpellCastResult CheckRequirement()
|
||||
@@ -363,9 +361,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_OOZE_ZAP_CHANNEL_END))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_OOZE_ZAP_CHANNEL_END });
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
@@ -399,9 +395,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ENERGIZED))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_ENERGIZED });
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
|
||||
Reference in New Issue
Block a user