mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[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:
parent
c3c7187841
commit
e1927fa4f8
2 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue