Core/WorldStates: Allow setting "hidden" field of SMSG_UPDATE_WORLD_STATE

This commit is contained in:
Shauren
2022-07-07 23:07:20 +02:00
parent 9ca8cf66e6
commit de26cafbbe
8 changed files with 92 additions and 90 deletions

View File

@@ -696,7 +696,7 @@ int32 Map::GetWorldStateValue(int32 worldStateId) const
return 0;
}
void Map::SetWorldStateValue(int32 worldStateId, int32 value)
void Map::SetWorldStateValue(int32 worldStateId, int32 value, bool hidden)
{
auto itr = _worldStateValues.try_emplace(worldStateId, 0).first;
int32 oldValue = itr->second;
@@ -710,6 +710,7 @@ void Map::SetWorldStateValue(int32 worldStateId, int32 value)
WorldPackets::WorldState::UpdateWorldState updateWorldState;
updateWorldState.VariableID = worldStateId;
updateWorldState.Value = value;
updateWorldState.Hidden = hidden;
updateWorldState.Write();
for (MapReference const& mapReference : m_mapRefManager)