Jump to content

[fix][7936] Fix a bug that tame beast may crash server


Recommended Posts

Posted

What bug does the patch fix? What features does the patch add?

Fix a bug that tame beast may crash server

For which repository revision was the patch created?

7588

src/game/SpellEffects.cpp: 

    finish(); 

Pet* pet = m_caster->CreateTamedPetFrom(creatureTarget,m_spellInfo->Id); 
+ if(!pet) return;   

// kill original creature 
creatureTarget->setDeathState(JUST_DIED); 

Posted
Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
{
   Pet* pet = new Pet(HUNTER_PET);

   if(!pet->CreateBaseAtCreature(creatureTarget))
   {
       delete pet;
       [b]return NULL[/b];
   }

Posted

And how can pet->CreateBaseAtCreature(creatureTarget) return false when CreateTamedPetFrom is called from that particular location .. These are the things that should be mentioned in comments around the NULL check. You don't need to think of all cases, just give one example of how such an error can occur and it's all justified.

Posted

I don't think the very big difference? Why has Trinity ,"Trinity is mangos!"

Why will have MANGOS later to have these many imagination thing ?!

E.G :A OR T and so on!

Is worth thinking deeply !!

Admires MANGOS very much! !

  • 2 months later...
Posted

Ok, additional review show that in some cases this pososble with not normal player but GM maybe or hacks using special possitions for wrong coordinates or somehting like.

In [7936]. Thank you for patch finding and prepering to mangos. Sorry, we not very favor to T* project and sceptic when look at releated changes. But next time and _always_ provided info where patch found and who author, if this patch not writed by you.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use