mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[11981] Fix targeting of most pet spells. They expect to target alive pets
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
d08edbd93c
commit
67fe27774c
2 changed files with 8 additions and 5 deletions
|
|
@ -4924,13 +4924,16 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
{
|
||||
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
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
else
|
||||
return SPELL_FAILED_NO_PET;
|
||||
}
|
||||
else if (!pet->isAlive())
|
||||
return SPELL_FAILED_TARGETS_DEAD;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11980"
|
||||
#define REVISION_NR "11981"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue