*Try to fix the bug about contested pvp.
--HG-- branch : trunk
This commit is contained in:
+2
-2
@@ -9768,7 +9768,7 @@ void Unit::CombatStart(Unit* target)
|
|||||||
target->SetInCombatWith(this);
|
target->SetInCombatWith(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Player* attackedPlayer = GetCharmerOrOwnerPlayerOrPlayerItself())
|
if(Player* attackedPlayer = target->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||||
SetContestedPvP(attackedPlayer);
|
SetContestedPvP(attackedPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12363,7 +12363,7 @@ void Unit::SetContestedPvP(Player *attackedPlayer)
|
|||||||
player->addUnitState(UNIT_STAT_ATTACK_PLAYER);
|
player->addUnitState(UNIT_STAT_ATTACK_PLAYER);
|
||||||
player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP);
|
player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP);
|
||||||
// call MoveInLineOfSight for nearby contested guards
|
// call MoveInLineOfSight for nearby contested guards
|
||||||
SetVisibility(GetVisibility());
|
player->SetVisibility(GetVisibility());
|
||||||
}
|
}
|
||||||
if(!hasUnitState(UNIT_STAT_ATTACK_PLAYER))
|
if(!hasUnitState(UNIT_STAT_ATTACK_PLAYER))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user