示例#1
0
        /// <summary>
        /// Executes the day and night process
        /// </summary>
        public override void Execute()
        {
            try
            {
                if (PlusEnvironment.GetGame() == null)
                {
                    return;
                }

                if (PlusEnvironment.GetGame().GetRoomManager() == null)
                {
                    return;
                }

                if (PlusEnvironment.GetGame().GetRoomManager().GetRooms().Count <= 0)
                {
                    return;
                }

                DayNightManager.SetTime();
            }
            catch (Exception e)
            {
                Logging.LogRPTimersError("Error in Execute() void: " + e);
                base.EndTimer();
            }
        }