Core/Logs: Add load time to some logs like every other load log
Port From (https://github.com/TrinityCore/TrinityCore/commit/41a4692de37c7591516d9a9f86b3019b90556428)
This commit is contained in:
@@ -38,6 +38,8 @@ namespace Game
|
||||
|
||||
public void LoadFromDB()
|
||||
{
|
||||
uint oldMSTime = Time.GetMSTime();
|
||||
|
||||
uint count = 0;
|
||||
_maxEventId = 0;
|
||||
_maxInviteId = 0;
|
||||
@@ -72,8 +74,9 @@ namespace Game
|
||||
while (result.NextRow());
|
||||
}
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} calendar events", count);
|
||||
Log.outInfo(LogFilter.ServerLoading, $"Loaded {count} calendar events in {Time.GetMSTimeDiffToNow(oldMSTime)} ms");
|
||||
count = 0;
|
||||
oldMSTime = Time.GetMSTime();
|
||||
|
||||
// 0 1 2 3 4 5 6 7
|
||||
result = DB.Characters.Query("SELECT InviteID, EventID, Invitee, Sender, Status, ResponseTime, ModerationRank, Note FROM calendar_invites");
|
||||
@@ -100,7 +103,7 @@ namespace Game
|
||||
while (result.NextRow());
|
||||
}
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} calendar invites", count);
|
||||
Log.outInfo(LogFilter.ServerLoading, $"Loaded {count} calendar invites in {Time.GetMSTimeDiffToNow(oldMSTime)} ms");
|
||||
|
||||
for (ulong i = 1; i < _maxEventId; ++i)
|
||||
if (GetEvent(i) == null)
|
||||
|
||||
@@ -29,6 +29,8 @@ namespace Game
|
||||
|
||||
public void LoadWardenChecks()
|
||||
{
|
||||
uint oldMSTime = Time.GetMSTime();
|
||||
|
||||
// Check if Warden is enabled by config before loading anything
|
||||
if (!WorldConfig.GetBoolValue(WorldCfg.WardenEnabled))
|
||||
{
|
||||
@@ -98,11 +100,13 @@ namespace Game
|
||||
}
|
||||
while (result.NextRow());
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} warden checks.", count);
|
||||
Log.outInfo(LogFilter.ServerLoading, $"Loaded {count} warden checks in {Time.GetMSTimeDiffToNow(oldMSTime)} ms");
|
||||
}
|
||||
|
||||
public void LoadWardenOverrides()
|
||||
{
|
||||
uint oldMSTime = Time.GetMSTime();
|
||||
|
||||
// Check if Warden is enabled by config before loading anything
|
||||
if (!WorldConfig.GetBoolValue(WorldCfg.WardenEnabled))
|
||||
{
|
||||
@@ -138,7 +142,7 @@ namespace Game
|
||||
}
|
||||
while (result.NextRow());
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} warden action overrides.", count);
|
||||
Log.outInfo(LogFilter.ServerLoading, $"Loaded {count} warden action overrides in {Time.GetMSTimeDiffToNow(oldMSTime)} ms");
|
||||
}
|
||||
|
||||
public WardenCheck GetWardenDataById(ushort Id)
|
||||
|
||||
Reference in New Issue
Block a user