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:

View File

@@ -1193,6 +1193,8 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
return spellId == 56618;
else if (team == TEAM_ALLIANCE)
return spellId == 56617;
else
return false;
break;
}
// Hellscream's Warsong