fix(Core/BattlefieldWG): Workshops/Graveyard not changing to neutral (#14002)

This commit is contained in:
Pedro Antonio
2023-03-16 18:51:59 +01:00
committed by GitHub
parent 7207be2057
commit 175c961c54
2 changed files with 13 additions and 0 deletions

View File

@@ -1474,6 +1474,17 @@ struct WGWorkshop
// Send warning message to all player to inform a faction attack to a workshop
// alliance / horde attacking a workshop
bf->SendWarning(teamControl ? WorkshopsData[workshopId].attackText : (WorkshopsData[workshopId].attackText + 2));
// Updating worldstate, update icon to neutral
state = BATTLEFIELD_WG_OBJECTSTATE_NEUTRAL_INTACT;
bf->SendUpdateWorldState(WorkshopsData[workshopId].worldstate, state);
// Found associate graveyard and update it
if (workshopId < BATTLEFIELD_WG_WORKSHOP_KEEP_WEST)
if (bf->GetGraveyardById(workshopId))
bf->GetGraveyardById(workshopId)->GiveControlTo(team);
teamControl = team;
break;
}
case TEAM_ALLIANCE: