diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index a389f3c28..822965adc 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4920,17 +4920,20 @@ SpellCastResult Spell::CheckCast(bool strict) } // check pet presents - for(int j = 0; j < MAX_EFFECT_INDEX; ++j) + for (int j = 0; j < MAX_EFFECT_INDEX; ++j) { - if(m_spellInfo->EffectImplicitTargetA[j] == TARGET_PET) + if (m_spellInfo->EffectImplicitTargetA[j] == TARGET_PET) { - if(!m_caster->GetPet()) + Pet* pet = m_caster->GetPet(); + if (!pet) { - if(m_triggeredByAuraSpell) // not report pet not existence for triggered spells + if (m_triggeredByAuraSpell) // not report pet not existence for triggered spells return SPELL_FAILED_DONT_REPORT; else return SPELL_FAILED_NO_PET; } + else if (!pet->isAlive()) + return SPELL_FAILED_TARGETS_DEAD; break; } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c3a676523..d54444a36 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11980" + #define REVISION_NR "11981" #endif // __REVISION_NR_H__