mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +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:
@@ -737,9 +737,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SERVICE_UNIFORM))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_SERVICE_UNIFORM });
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -217,9 +217,7 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_CRAB_DISGUISE))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo({ SPELL_CRAB_DISGUISE });
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -29,11 +29,12 @@ public:
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_MISTLETOE) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_CREATE_HOLLY) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_CREATE_SNOWFLAKES))
|
||||
return false;
|
||||
return true;
|
||||
return ValidateSpellInfo(
|
||||
{
|
||||
SPELL_CREATE_MISTLETOE,
|
||||
SPELL_CREATE_HOLLY,
|
||||
SPELL_CREATE_SNOWFLAKES
|
||||
});
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
@@ -293,4 +294,4 @@ void AddSC_event_winter_veil_scripts()
|
||||
new spell_winter_veil_racer_rocket_slam();
|
||||
new spell_winter_veil_racer_slam_hit();
|
||||
new spell_winter_veil_shoot_air_rifle();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user