fix(Scripts/SpellHunter): prevent crash in spell_hun_readiness (#8847)

This commit is contained in:
Francesco Borzì 2021-10-31 08:20:51 +01:00 committed by GitHub
parent d716265f48
commit 469c572d60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -798,8 +798,12 @@ public:
++next;
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
if (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->Id != SPELL_HUNTER_READINESS && spellInfo->Id != SPELL_HUNTER_BESTIAL_WRATH &&
spellInfo->Id != SPELL_DRAENEI_GIFT_OF_THE_NAARU && spellInfo->GetRecoveryTime() > 0)
if (spellInfo
&& spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER
&& spellInfo->Id != SPELL_HUNTER_READINESS
&& spellInfo->Id != SPELL_HUNTER_BESTIAL_WRATH
&& spellInfo->Id != SPELL_DRAENEI_GIFT_OF_THE_NAARU
&& spellInfo->GetRecoveryTime() > 0)
{
caster->RemoveSpellCooldown(spellInfo->Id, itr->second.needSendToClient);
}