aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-02 16:34:00 -0600
committermegamage <none@none>2008-12-02 16:34:00 -0600
commit1fd4c1dee2f7579aeeeaf7e9e9c6ed8f5555824b (patch)
tree6ace0625c51f5bd868158fe11f72525c9a07bd16 /src/game/Unit.cpp
parent724b627f49ed516ce833e00f6c84cf205bd1636c (diff)
*Try to fix the bug about contested pvp.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp4
1 files changed, 2 insertions, 2 deletions
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))
{