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.
This commit is contained in:
SnapperRy
2016-10-09 00:18:42 +02:00
committed by Aokromes
parent b2506d600c
commit e0f43cca2d
2 changed files with 5 additions and 5 deletions

View File

@@ -476,7 +476,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);
@@ -1809,8 +1809,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);
}

View File

@@ -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
};