fix(Core/Spells): possible crashes within class spells (#9168)

This commit is contained in:
Nefertumm
2021-11-21 11:41:51 -03:00
committed by GitHub
parent 92b3617f63
commit 61c7488698
9 changed files with 66 additions and 25 deletions

View File

@@ -658,6 +658,11 @@ class spell_sha_earthliving_weapon : public AuraScript
{
auto chance = 20;
Unit* caster = eventInfo.GetActor();
if (!caster || !eventInfo.GetProcTarget())
{
return false;
}
if (AuraEffect const* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1, EFFECT_1, caster->GetGUID()))
{
if (eventInfo.GetProcTarget()->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT))