DB/SpawnGroup: Instance spawn group data for Tempest Keep: The Eye and Hellfire Citadel: Ramparts.

(also some minor adjustments to command output for convenience)
This commit is contained in:
Treeston
2018-01-25 13:45:11 +01:00
parent 6c3c200cc5
commit 51e28ae76a
6 changed files with 376 additions and 7 deletions

View File

@@ -3311,7 +3311,7 @@ bool Map::SpawnGroupSpawn(uint32 groupId, bool ignoreRespawn, bool force, std::v
return true;
}
bool Map::SpawnGroupDespawn(uint32 groupId, bool deleteRespawnTimes)
bool Map::SpawnGroupDespawn(uint32 groupId, bool deleteRespawnTimes, size_t* count)
{
SpawnGroupTemplateData const* groupData = GetSpawnGroupData(groupId);
if (!groupData || groupData->flags & SPAWNGROUP_FLAG_SYSTEM)
@@ -3348,6 +3348,10 @@ bool Map::SpawnGroupDespawn(uint32 groupId, bool deleteRespawnTimes)
return false;
}
}
if (count)
*count = toUnload.size();
// now do the actual despawning
for (WorldObject* obj : toUnload)
obj->AddObjectToRemoveList();