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:
1 parent
b2506d600c
commit
e0f43cca2d
2 files changed
+5
-5
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user