From 1fd4c1dee2f7579aeeeaf7e9e9c6ed8f5555824b Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 2 Dec 2008 16:34:00 -0600 Subject: *Try to fix the bug about contested pvp. --HG-- branch : trunk --- src/game/Unit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index d6a2c64013a..6dc5e6201a5 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9768,7 +9768,7 @@ void Unit::CombatStart(Unit* target) target->SetInCombatWith(this); } - if(Player* attackedPlayer = GetCharmerOrOwnerPlayerOrPlayerItself()) + if(Player* attackedPlayer = target->GetCharmerOrOwnerPlayerOrPlayerItself()) SetContestedPvP(attackedPlayer); } @@ -12363,7 +12363,7 @@ void Unit::SetContestedPvP(Player *attackedPlayer) player->addUnitState(UNIT_STAT_ATTACK_PLAYER); player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP); // call MoveInLineOfSight for nearby contested guards - SetVisibility(GetVisibility()); + player->SetVisibility(GetVisibility()); } if(!hasUnitState(UNIT_STAT_ATTACK_PLAYER)) { -- cgit v1.2.3