diff options
author | megamage <none@none> | 2009-05-06 16:47:51 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-06 16:47:51 -0500 |
commit | ae4bdc81388e70603c74bb82709725a8e3250e91 (patch) | |
tree | fa0defac561418393cc61148d41fb79102993d0c /src | |
parent | 5e2bec88dc2388e1cfba3bf7a7abeef52e4649f7 (diff) |
[7786] Proper hostile zones marking for PvE servers. Author: Elron
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Player.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index cb2e908c069..494334466f4 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -6181,11 +6181,24 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea) } } - pvpInfo.inHostileArea = - GetTeam() == ALLIANCE && zone->team == AREATEAM_HORDE || - GetTeam() == HORDE && zone->team == AREATEAM_ALLY || - sWorld.IsPvPRealm() && zone->team == AREATEAM_NONE || - InBattleGround(); // overwrite for battlegrounds, maybe batter some zone flags but current known not 100% fit to this + // in PvP, any not controlled zone (except zone->team == 6, default case) + // in PvE, only opposition team capital + switch(zone->team) + { + case AREATEAM_ALLY: + pvpInfo.inHostileArea = GetTeam() != ALLIANCE && (sWorld.IsPvPRealm() || zone->flags & AREA_FLAG_CAPITAL); + break; + case AREATEAM_HORDE: + pvpInfo.inHostileArea = GetTeam() != HORDE && (sWorld.IsPvPRealm() || zone->flags & AREA_FLAG_CAPITAL); + break; + case AREATEAM_NONE: + // overwrite for battlegrounds, maybe batter some zone flags but current known not 100% fit to this + pvpInfo.inHostileArea = sWorld.IsPvPRealm() || InBattleGround(); + break; + default: // 6 in fact + pvpInfo.inHostileArea = false; + break; + } if(pvpInfo.inHostileArea) // in hostile area { |