feat(Core/Spell): AssertSpellInfo (#6115)

* feat(Core/Spell): AssertSpellInfo

(cherry picked from commit e52878b6b5)
(cherry picked from commit 8c44259fae)
Co-Authored-By: Shauren <shauren.trinity@gmail.com>
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>

* Update SpellMgr.h
This commit is contained in:
Kitzunu
2021-06-03 07:39:48 +02:00
committed by GitHub
parent 7152ddc82c
commit a75e34c793
15 changed files with 29 additions and 29 deletions

View File

@@ -3596,7 +3596,7 @@ public:
void Register() override
{
SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
SpellInfo const* spell = sSpellMgr->AssertSpellInfo(m_scriptSpellId);
if (spell->HasEffect(SPELL_EFFECT_SCRIPT_EFFECT))
OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
@@ -3669,7 +3669,7 @@ public:
void Register() override
{
SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
SpellInfo const* spell = sSpellMgr->AssertSpellInfo(m_scriptSpellId);
// Defend spells cast by NPCs (add visuals)
if (spell->Effects[EFFECT_0].ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)