mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7716] Fixed some typos and possible crashes.
This commit is contained in:
parent
c2e6dd20dd
commit
c9d51a6dc7
25 changed files with 281 additions and 263 deletions
|
|
@ -194,10 +194,19 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
|||
//auto turn to target unless possessed
|
||||
if(result == SPELL_FAILED_UNIT_NOT_INFRONT && !pet->HasAuraType(SPELL_AURA_MOD_POSSESS))
|
||||
{
|
||||
pet->SetInFront(unit_target);
|
||||
if( unit_target->GetTypeId() == TYPEID_PLAYER )
|
||||
pet->SendUpdateToPlayer( (Player*)unit_target );
|
||||
if(Unit* powner = pet->GetCharmerOrOwner())
|
||||
if(unit_target)
|
||||
{
|
||||
pet->SetInFront(unit_target);
|
||||
if (unit_target->GetTypeId() == TYPEID_PLAYER)
|
||||
pet->SendUpdateToPlayer( (Player*)unit_target );
|
||||
}
|
||||
else if(Unit *unit_target2 = spell->m_targets.getUnitTarget())
|
||||
{
|
||||
pet->SetInFront(unit_target2);
|
||||
if (unit_target2->GetTypeId() == TYPEID_PLAYER)
|
||||
pet->SendUpdateToPlayer( (Player*)unit_target2 );
|
||||
}
|
||||
if (Unit* powner = pet->GetCharmerOrOwner())
|
||||
if(powner->GetTypeId() == TYPEID_PLAYER)
|
||||
pet->SendUpdateToPlayer((Player*)powner);
|
||||
result = SPELL_CAST_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue