Jump to content

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


Guest marry521

Recommended Posts

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); 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...

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.

Link to comment
Share on other sites

×
×
  • 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