This commit is contained in:
megamage committed 2011-11-28 14:34:30 -05:00
1 parent 1f70fd2851
commit 5b034ee631
3 files changed
+1 -12

No files matched your search

-6
View File
@@ -3823,10 +3823,7 @@ void Spell::EffectTameCreature(SpellEffIndex /*effIndex*/)
Pet* pet = m_caster->CreateTamedPetFrom(creatureTarget, m_spellInfo->Id);
if (!pet) // in very specific state like near world end/etc.
{
delete pet;
return;
}
// "kill" original creature
creatureTarget->DespawnOrUnsummon();
@@ -7012,10 +7009,7 @@ void Spell::EffectCreateTamedPet(SpellEffIndex effIndex)
uint32 creatureEntry = m_spellInfo->Effects[effIndex].MiscValue;
Pet* pet = unitTarget->CreateTamedPetFrom(creatureEntry, m_spellInfo->Id);
if (!pet)
{
delete pet;
return;
}
// add to world
pet->GetMap()->AddToMap(pet->ToCreature());