From 9f1051bd4a19e2cdb39e1b078bd74478e34fbfe1 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 1 Mar 2022 23:49:30 -0500 Subject: [PATCH] Core/World: added startup log outputs for query cache initialization for detailed information. Port From (https://github.com/TrinityCore/TrinityCore/commit/9c38dc2367e1bb59a5a4ad7a52abd522a035ae5d) --- Source/Game/Globals/ObjectManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Game/Globals/ObjectManager.cs b/Source/Game/Globals/ObjectManager.cs index f5eeb7e8a..44f2af5e5 100644 --- a/Source/Game/Globals/ObjectManager.cs +++ b/Source/Game/Globals/ObjectManager.cs @@ -9987,9 +9987,14 @@ namespace Game } public void InitializeQueriesData(QueryDataGroup mask) { + uint oldMSTime = Time.GetMSTime(); + // cache disabled if (!WorldConfig.GetBoolValue(WorldCfg.CacheDataQueries)) + { + Log.outInfo(LogFilter.ServerLoading, "Query data caching is disabled. Skipped initialization."); return; + } // Initialize Query data for creatures if (mask.HasAnyFlag(QueryDataGroup.Creatures)) @@ -10010,6 +10015,8 @@ namespace Game if (mask.HasAnyFlag(QueryDataGroup.POIs)) foreach (var poiPair in _questPOIStorage) poiPair.Value.InitializeQueryData(); + + Log.outInfo(LogFilter.ServerLoading, $"Initialized query cache data in {Time.GetMSTimeDiffToNow(oldMSTime)} ms"); } public void LoadJumpChargeParams() {