Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2023-04-20 16:01:49 -06:00
committed by GitHub
21 changed files with 295 additions and 230 deletions

View File

@@ -206,7 +206,7 @@ void LoadM2Cameras(std::string const& dataPath)
// Reject if not at least the size of the header
if (static_cast<uint32>(fileSize) < sizeof(M2Header))
{
LOG_ERROR("server.loading", "Camera file %s is damaged. File is smaller than header size", filename.string().c_str());
LOG_ERROR("server.loading", "Camera file {} is damaged. File is smaller than header size", filename.string().c_str());
m2file.close();
continue;
}
@@ -220,7 +220,7 @@ void LoadM2Cameras(std::string const& dataPath)
// Check file has correct magic (MD20)
if (strcmp(fileCheck, "MD20"))
{
LOG_ERROR("server.loading", "Camera file %s is damaged. File identifier not found", filename.string().c_str());
LOG_ERROR("server.loading", "Camera file {} is damaged. File identifier not found", filename.string().c_str());
m2file.close();
continue;
}
@@ -240,14 +240,14 @@ void LoadM2Cameras(std::string const& dataPath)
if (header->ofsCameras + sizeof(M2Camera) > static_cast<uint32>(fileSize))
{
LOG_ERROR("server.loading", "Camera file %s is damaged. Camera references position beyond file end", filename.string().c_str());
LOG_ERROR("server.loading", "Camera file {} is damaged. Camera references position beyond file end", filename.string().c_str());
continue;
}
// Get camera(s) - Main header, then dump them.
M2Camera const* cam = reinterpret_cast<M2Camera const*>(buffer.data() + header->ofsCameras);
if (!readCamera(cam, fileSize, header, dbcentry))
LOG_ERROR("server.loading", "Camera file %s is damaged. Camera references position beyond file end", filename.string().c_str());
LOG_ERROR("server.loading", "Camera file {} is damaged. Camera references position beyond file end", filename.string().c_str());
}
LOG_INFO("server.loading", ">> Loaded {} Cinematic Waypoint Sets in {} ms", (uint32)sFlyByCameraStore.size(), GetMSTimeDiffToNow(oldMSTime));