mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Core/WorldStates: Allow setting "hidden" field of SMSG_UPDATE_WORLD_STATE
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user