*Let owner enter pvp when pet attacks pvp target.
--HG-- branch : trunk
This commit is contained in:
1 parent
3035a78c3d
commit
08d259e0cc
3 files changed
+16
-6
No files matched your search
+12
-2
@@ -9768,8 +9768,18 @@ void Unit::CombatStart(Unit* target)
|
||||
target->SetInCombatWith(this);
|
||||
}
|
||||
|
||||
if(Player* attackedPlayer = target->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
SetContestedPvP(attackedPlayer);
|
||||
Unit *who = target->GetCharmerOrOwnerOrSelf();
|
||||
if(who->GetTypeId() == TYPEID_PLAYER)
|
||||
SetContestedPvP((Player*)who);
|
||||
|
||||
Player *me = GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||
if(me && who->IsPvP()
|
||||
&& (who->GetTypeId() != TYPEID_PLAYER
|
||||
|| !me->duel || me->duel->opponent != who))
|
||||
{
|
||||
me->UpdatePvP(true);
|
||||
me->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT);
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::SetInCombatState(bool PvP)
|
||||
|
||||
Reference in new issue
Block a user