diff options
-rwxr-xr-x | src/server/game/Spells/Spell.cpp | 5 | ||||
-rwxr-xr-x | src/server/game/Spells/SpellEffects.cpp | 12 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index bc12f85b832..36d7328f37e 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5238,10 +5238,8 @@ SpellCastResult Spell::CheckCast(bool strict) case SPELL_EFFECT_SUMMON_DEAD_PET: { Creature* pet = m_caster->GetGuardianPet(); - if (!pet) - return SPELL_FAILED_NO_PET; - if (pet->isAlive()) + if (pet && pet->isAlive()) return SPELL_FAILED_ALREADY_HAVE_SUMMON; break; @@ -5291,7 +5289,6 @@ SpellCastResult Spell::CheckCast(bool strict) if (m_caster->GetCharmGUID()) return SPELL_FAILED_ALREADY_HAVE_CHARM; - break; } case SPELL_EFFECT_SUMMON_PLAYER: diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 67202dda66d..97e75a0c6db 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5726,7 +5726,7 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/) return; Pet* pet = player->GetPet(); - if (!pet || pet->isAlive()) + if (pet && pet->isAlive()) return; if (damage < 0) @@ -5734,8 +5734,16 @@ void Spell::EffectSummonDeadPet(SpellEffIndex /*effIndex*/) float x, y, z; player->GetPosition(x, y, z); + if (!pet) + { + player->SummonPet(0, x, y, z, player->GetOrientation(), SUMMON_PET, 0); + pet = player->GetPet(); + } + if (!pet) + return; + player->GetMap()->CreatureRelocation(pet, x, y, z, player->GetOrientation()); - + pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE); pet->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); pet->setDeathState(ALIVE); |