diff options
author | SnapperRy <snapperryen@gmail.com> | 2016-10-09 00:18:42 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-09-05 11:49:50 +0200 |
commit | d9ababbc2ca1dfeed1df388be5595fdfa4437f40 (patch) | |
tree | a579edba13dc20e0816132642b917384b693e825 | |
parent | fa06aad708642ffdf20c1fd20a1d796d5eaf47a4 (diff) |
Core/Wintergrasp: fix ownership of workshops at the beginning of a new battle.
Those two, together with the two workshop in the Keep, always belong to the defender team. The SouthEast and SouthWest ones always belong to the attacker team.
(cherry picked from commit b8bb1545ecd9abcca55dc1abaebb0a7eda1d00a3)
-rw-r--r-- | src/server/game/Battlefield/Zones/BattlefieldWG.cpp | 6 | ||||
-rw-r--r-- | src/server/game/Battlefield/Zones/BattlefieldWG.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index 4e6e275ee62..9409c54174a 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -482,7 +482,7 @@ bool BattlefieldWG::SetupBattlefield() for (uint8 i = 0; i < WG_MAX_WORKSHOP; i++) { WintergraspWorkshop* workshop = new WintergraspWorkshop(this, i); - if (i < BATTLEFIELD_WG_WORKSHOP_KEEP_WEST) + if (i < BATTLEFIELD_WG_WORKSHOP_NE) workshop->GiveControlTo(GetAttackerTeam(), true); else workshop->GiveControlTo(GetDefenderTeam(), true); @@ -1810,8 +1810,8 @@ void WintergraspWorkshop::GiveControlTo(TeamId teamId, bool init /*= false*/) void WintergraspWorkshop::UpdateGraveyardAndWorkshop() { - if (_staticInfo->WorkshopId < BATTLEFIELD_WG_WORKSHOP_KEEP_WEST) - _wg->GetGraveyardById(_staticInfo->WorkshopId)->GiveControlTo(_teamControl); + if (_staticInfo->WorkshopId < BATTLEFIELD_WG_WORKSHOP_NE) + GiveControlTo(_wg->GetAttackerTeam(), true); else GiveControlTo(_wg->GetDefenderTeam(), true); } diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index 60ce0b7b7e2..1d734eb15c8 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -436,10 +436,10 @@ enum WintergraspTowerIds enum WintergraspWorkshopIds { - BATTLEFIELD_WG_WORKSHOP_NE, - BATTLEFIELD_WG_WORKSHOP_NW, BATTLEFIELD_WG_WORKSHOP_SE, BATTLEFIELD_WG_WORKSHOP_SW, + BATTLEFIELD_WG_WORKSHOP_NE, + BATTLEFIELD_WG_WORKSHOP_NW, BATTLEFIELD_WG_WORKSHOP_KEEP_WEST, BATTLEFIELD_WG_WORKSHOP_KEEP_EAST }; |