mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
feat(Core/Scripting): Implement OnIsAffectedBySpellModCheck hook (#9903)
This commit is contained in:
@@ -1280,8 +1280,19 @@ bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod) const
|
||||
return false;
|
||||
|
||||
SpellInfo const* affectSpell = sSpellMgr->GetSpellInfo(mod->spellId);
|
||||
|
||||
if (!affectSpell)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sScriptMgr->OnIsAffectedBySpellModCheck(affectSpell, this, mod))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// False if affect_spell == nullptr or spellFamily not equal
|
||||
if (!affectSpell || affectSpell->SpellFamilyName != SpellFamilyName)
|
||||
if (affectSpell->SpellFamilyName != SpellFamilyName)
|
||||
return false;
|
||||
|
||||
// true
|
||||
|
||||
Reference in New Issue
Block a user