[7936] Fixed low chance but possible crash at creature tame.

Thanks to marry521 for patch preparing to mangos.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
megamage 2009-06-01 11:16:17 +04:00 committed by VladimirMangos
parent c3c7187841
commit e1927fa4f8
2 changed files with 3 additions and 1 deletions

View file

@ -4039,6 +4039,8 @@ void Spell::EffectTameCreature(uint32 /*i*/)
finish();
Pet* pet = m_caster->CreateTamedPetFrom(creatureTarget,m_spellInfo->Id);
if(!pet) // in versy specific state like near world end/etc.
return;
// kill original creature
creatureTarget->setDeathState(JUST_DIED);