Core/Spawns: Added startup error for incorrect map assignments in instance_spawn_groups
This commit is contained in:
1 parent
3d62f2b44c
commit
6856c1a0be
2 files changed
+11
-6
No files matched your search
@@ -2707,9 +2707,14 @@ void ObjectMgr::LoadInstanceSpawnGroups()
|
||||
}
|
||||
|
||||
uint16 const instanceMapId = fields[0].GetUInt16();
|
||||
auto& vector = _instanceSpawnGroupStore[instanceMapId];
|
||||
vector.emplace_back();
|
||||
InstanceSpawnGroupInfo& info = vector.back();
|
||||
if (it->second.mapId != instanceMapId)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Instance spawn group %u specified for instance %u has spawns on a different map %u. Skipped.",
|
||||
spawnGroupId, instanceMapId, it->second.mapId);
|
||||
continue;
|
||||
}
|
||||
|
||||
InstanceSpawnGroupInfo& info = _instanceSpawnGroupStore[instanceMapId].emplace_back();
|
||||
info.SpawnGroupId = spawnGroupId;
|
||||
info.BossStateId = fields[1].GetUInt8();
|
||||
|
||||
|
||||
@@ -1878,9 +1878,6 @@ void World::SetInitialWorldSettings()
|
||||
TC_LOG_INFO("server.loading", "Loading Spawn Group Templates...");
|
||||
sObjectMgr->LoadSpawnGroupTemplates();
|
||||
|
||||
TC_LOG_INFO("server.loading", "Loading instance spawn groups...");
|
||||
sObjectMgr->LoadInstanceSpawnGroups();
|
||||
|
||||
TC_LOG_INFO("server.loading", "Loading Creature Data...");
|
||||
sObjectMgr->LoadCreatures();
|
||||
|
||||
@@ -1908,6 +1905,9 @@ void World::SetInitialWorldSettings()
|
||||
TC_LOG_INFO("server.loading", "Loading Spawn Group Data...");
|
||||
sObjectMgr->LoadSpawnGroups();
|
||||
|
||||
TC_LOG_INFO("server.loading", "Loading instance spawn groups...");
|
||||
sObjectMgr->LoadInstanceSpawnGroups();
|
||||
|
||||
TC_LOG_INFO("server.loading", "Loading GameObject Addon Data...");
|
||||
sObjectMgr->LoadGameObjectAddons(); // must be after LoadGameObjectTemplate() and LoadGameObjects()
|
||||
|
||||
|
||||
Reference in new issue
Block a user