diff options
| author | SnapperRy <snapperryen@gmail.com> | 2016-10-09 00:18:42 +0200 |
|---|---|---|
| committer | SnapperRy <snapperryen@gmail.com> | 2016-10-09 00:18:42 +0200 |
| commit | b8bb1545ecd9abcca55dc1abaebb0a7eda1d00a3 (patch) | |
| tree | 2011b5c97a3f041c703ed2af878beafa8daa2328 /src | |
| parent | abe514d548b0dabbc7784bfe4dbf4ff85a97b6d6 (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.
Diffstat (limited to 'src')
| -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 193377d27be..7016494de0e 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -477,7 +477,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 6cc0b72bbcc..7769a9b4b6d 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 }; |
