mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
Merge commit 'origin/master' into 310
Conflicts: src/game/Player.cpp
This commit is contained in:
commit
950a4bf13f
52 changed files with 623 additions and 474 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