mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
Fixed possible crash in Aura::HandleModPossessPet
Also small code cleanup.
This commit is contained in:
parent
6cee03bae0
commit
82cbd9152d
2 changed files with 22 additions and 15 deletions
|
|
@ -3030,8 +3030,11 @@ void Aura::HandleModPossessPet(bool apply, bool Real)
|
|||
return;
|
||||
|
||||
Unit* caster = GetCaster();
|
||||
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Pet *pet = caster->GetPet();
|
||||
if(!pet || (pet != m_target) || !caster || (caster->GetTypeId() != TYPEID_PLAYER))
|
||||
if(!pet || pet != m_target)
|
||||
return;
|
||||
|
||||
if(apply)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue