From d9ababbc2ca1dfeed1df388be5595fdfa4437f40 Mon Sep 17 00:00:00 2001 From: SnapperRy Date: Sun, 9 Oct 2016 00:18:42 +0200 Subject: 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) --- src/server/game/Battlefield/Zones/BattlefieldWG.cpp | 6 +++--- src/server/game/Battlefield/Zones/BattlefieldWG.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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 }; -- cgit v1.2.3