ACR_ServerCommunicator.GameWorldManager.RunQueryCycle C# (CSharp) Method

RunQueryCycle() private method

This method polls the database for changes and updates the game world state as appropriate.
private RunQueryCycle ( ) : void
return void
        private void RunQueryCycle()
        {
            DatabasePollCycle += 1;

            //
            // Coalesce and transmit outbound IPC requests.
            //

            TransmitOutboundIPCEvents();

            //
            // Always synchronize the IPC queue.
            //

            SynchronizeIPCEventQueue();

            //
            // Every POLLING_CYCLES_TO_CHARACTER_SYNC cycles, update the online
            // status of characters in the online character list.
            //

            if ((DatabasePollCycle - 1) % POLLING_CYCLES_TO_CHARACTER_SYNC == 0)
                SynchronizeOnlineCharacters();

            //
            // Every POLLING_CYCLES_TO_SERVER_SYNC cycles, update the online
            // status of known servers.
            //

            if ((DatabasePollCycle - 1) % POLLING_CYCLES_TO_SERVER_SYNC == 0)
                SynchronizeOnlineServers();

            //
            // If requested, synchronize updates to the configuration store.
            //

            if (NextCycleSynchronizeConfiguration)
            {
                NextCycleSynchronizeConfiguration = false;
                SynchronizeConfiguration();
                ServerVaultConnector.RefreshConfiguration(Configuration.VaultConnectionString, Configuration.VerboseVaultLogging);
            }

            //
            // If requested, refresh the last write time on the timestamp
            // persist variable in the persist store, indicating that the
            // server is still online.
            //

            if (NextCycleUpdateServerCheckinTimestamp)
            {
                NextCycleUpdateServerCheckinTimestamp = false;
                UpdateServerCheckinTimestamp();
            }

            //
            // If we had any general actions that had to be performed on the
            // database query/synchronizer thread, execute the queue now.
            //

            DispatchQueryThreadActions();

#if DEBUG_MODE
            ConsistencyCheck();
#endif
        }