mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Maps: Properly set initial spawn group state for groups that have conditions (#29509)
This commit is contained in:
@@ -2452,6 +2452,16 @@ bool Map::IsSpawnGroupActive(uint32 groupId) const
|
||||
return (_toggledSpawnGroupIds.find(groupId) != _toggledSpawnGroupIds.end()) != !(data->flags & SPAWNGROUP_FLAG_MANUAL_SPAWN);
|
||||
}
|
||||
|
||||
void Map::InitSpawnGroupState()
|
||||
{
|
||||
std::vector<uint32> const* spawnGroups = sObjectMgr->GetSpawnGroupsForMap(GetId());
|
||||
if (!spawnGroups)
|
||||
return;
|
||||
|
||||
for (uint32 spawnGroupId : *spawnGroups)
|
||||
SetSpawnGroupActive(spawnGroupId, sConditionMgr->IsMapMeetingNotGroupedConditions(CONDITION_SOURCE_TYPE_SPAWN_GROUP, spawnGroupId, this));
|
||||
}
|
||||
|
||||
void Map::UpdateSpawnGroupConditions()
|
||||
{
|
||||
std::vector<uint32> const* spawnGroups = sObjectMgr->GetSpawnGroupsForMap(GetId());
|
||||
|
||||
Reference in New Issue
Block a user