Core/Misc: Added the possibility to configure the hour at which the server will be return old mails or delete them.

Port From (https://github.com/TrinityCore/TrinityCore/commit/3b36278d0227d241643a618fdc0e8cce5133d78c)
This commit is contained in:
hondacrx
2021-01-08 20:38:58 -05:00
parent 90f8029fe1
commit 3e9b4d0cef
4 changed files with 18 additions and 2 deletions
+6
View File
@@ -562,6 +562,12 @@ namespace Game
Values[WorldCfg.GroupVisibility] = GetDefaultValue("Visibility.GroupMode", 1);
Values[WorldCfg.MailDeliveryDelay] = GetDefaultValue("MailDeliveryDelay", Time.Hour);
Values[WorldCfg.CleanOldMailTime] = GetDefaultValue("CleanOldMailTime", 4);
if (Values[WorldCfg.CleanOldMailTime] > 23)
{
Log.outError(LogFilter.ServerLoading, $"CleanOldMailTime ({Values[WorldCfg.CleanOldMailTime]}) must be an hour, between 0 and 23. Set to 4.");
Values[WorldCfg.CleanOldMailTime] = 4;
}
Values[WorldCfg.UptimeUpdate] = GetDefaultValue("UpdateUptimeInterval", 10);
if ((int)Values[WorldCfg.UptimeUpdate] <= 0)