mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7786] Proper hostile zones marking for PvE servers.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
7355eb2f52
commit
727268a4e8
2 changed files with 19 additions and 6 deletions
|
|
@ -6053,11 +6053,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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7785"
|
||||
#define REVISION_NR "7786"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue