mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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