mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 07:06:23 +00:00
chore(core): Cleanup code p2 (#16041)
* Update AchievementMgr.cpp * Update M2Stores.cpp * Update LFGHandler.cpp * Update PetHandler.cpp * Update WaypointMovementGenerator.cpp * Update ScriptMgr.cpp * Update SpellAuras.cpp * Update Spell.cpp * Update SecretMgr.cpp * Update SpellScript.cpp * Update SecretMgr.cpp * Update Spell.cpp * Update SpellAuras.cpp * Add files via upload * Update PetHandler.cpp * Update PetHandler.cpp * Update CalendarMgr.cpp * Update LFG.h * Update WaypointMovementGenerator.cpp * Update MapScripts.cpp * Update Unit.cpp * Update SmartScript.cpp
This commit is contained in:
@@ -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 {} 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());
|
||||
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 {} is damaged. File identifier not found", filename.string().c_str());
|
||||
LOG_ERROR("server.loading", "Camera file {} is damaged. File identifier not found", filename.string());
|
||||
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 {} 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());
|
||||
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 {} 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());
|
||||
}
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded {} Cinematic Waypoint Sets in {} ms", (uint32)sFlyByCameraStore.size(), GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
Reference in New Issue
Block a user