aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2019-06-27 21:54:07 +0200
committerShauren <shauren.trinity@gmail.com>2019-06-27 21:54:07 +0200
commitd39354e3a31f7fb2cd579e12638d6e6089eefceb (patch)
tree4559431bed646946a69c64fa1ba649ef217c81c6 /src
parent4c3b215dbb16abc17ab63ee4fc60909c386a5a1b (diff)
Core/Misc: Fixed log/query formatting with Difficulty
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp4
-rw-r--r--src/server/game/Instances/InstanceSaveMgr.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index a3112f45956..fc12ac76f7f 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1895,14 +1895,14 @@ inline std::vector<Difficulty> ParseSpawnDifficulties(std::string const& difficu
if (difficultyId && !sDifficultyStore.LookupEntry(difficultyId))
{
TC_LOG_ERROR("sql.sql", "Table `%s` has %s (GUID: " UI64FMTD ") with non invalid difficulty id %u, skipped.",
- table.c_str(), table.c_str(), spawnId, difficultyId);
+ table.c_str(), table.c_str(), spawnId, uint32(difficultyId));
continue;
}
if (!isTransportMap && mapDifficulties.find(difficultyId) == mapDifficulties.end())
{
TC_LOG_ERROR("sql.sql", "Table `%s` has %s (GUID: " UI64FMTD ") has unsupported difficulty %u for map (Id: %u).",
- table.c_str(), table.c_str(), spawnId, difficultyId, mapId);
+ table.c_str(), table.c_str(), spawnId, uint32(difficultyId), mapId);
continue;
}
diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp
index 96884723355..f4714bc4fc8 100644
--- a/src/server/game/Instances/InstanceSaveMgr.cpp
+++ b/src/server/game/Instances/InstanceSaveMgr.cpp
@@ -398,14 +398,14 @@ void InstanceSaveManager::LoadResetTimes()
if (!mapDiff)
{
TC_LOG_ERROR("misc", "InstanceSaveManager::LoadResetTimes: invalid mapid(%u)/difficulty(%u) pair in instance_reset!", mapid, uint32(difficulty));
- CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid, difficulty);
+ CharacterDatabase.DirectPExecute("DELETE FROM instance_reset WHERE mapid = '%u' AND difficulty = '%u'", mapid, uint32(difficulty));
continue;
}
// update the reset time if the hour in the configs changes
uint64 newresettime = (oldresettime / DAY) * DAY + diff;
if (oldresettime != newresettime)
- CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '%u' WHERE mapid = '%u' AND difficulty = '%u'", uint32(newresettime), mapid, difficulty);
+ CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '%u' WHERE mapid = '%u' AND difficulty = '%u'", uint32(newresettime), mapid, uint32(difficulty));
InitializeResetTimeFor(mapid, difficulty, newresettime);
} while (result->NextRow());
@@ -434,7 +434,7 @@ void InstanceSaveManager::LoadResetTimes()
{
// initialize the reset time
t = today + period + diff;
- CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u', '%u', '%u')", mapid, difficulty, (uint32)t);
+ CharacterDatabase.DirectPExecute("INSERT INTO instance_reset VALUES ('%u', '%u', '%u')", mapid, uint32(difficulty), (uint32)t);
}
if (t < now)
@@ -443,7 +443,7 @@ void InstanceSaveManager::LoadResetTimes()
// calculate the next reset time
t = (t / DAY) * DAY;
t += ((today - t) / period + 1) * period + diff;
- CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '" UI64FMTD "' WHERE mapid = '%u' AND difficulty= '%u'", (uint64)t, mapid, difficulty);
+ CharacterDatabase.DirectPExecute("UPDATE instance_reset SET resettime = '" UI64FMTD "' WHERE mapid = '%u' AND difficulty= '%u'", (uint64)t, mapid, uint32(difficulty));
}
InitializeResetTimeFor(mapid, difficulty, t);