Ejemplo n.º 1
0
        public static void ResolveScheduleCompletion()
        {
            if (DeletePreviousCycleRecords)
            {
                Queue m_Queue = new Queue();

                while (m_Queue.Count > 0)
                {
                    FactionCaptureEvent captureEvent = (FactionCaptureEvent)m_Queue.Dequeue();

                    captureEvent.Delete();
                }
            }
        }
Ejemplo n.º 2
0
        public static void FactionDeleteAllCaptureEvents(CommandEventArgs arg)
        {
            PlayerMobile pm_Mobile = arg.Mobile as PlayerMobile;

            if (pm_Mobile == null)
            {
                return;
            }

            CurrentSchedulePosition = 1;
            CurrentEventPosition    = 1;
            CurrentCyclePosition    = 1;

            if (Active)
            {
                EndCaptureEvent();
            }

            Queue m_Queue = new Queue();

            foreach (FactionCaptureEvent FactionCaptureEvent in CaptureEvents)
            {
                m_Queue.Enqueue(FactionCaptureEvent);
            }

            while (m_Queue.Count > 0)
            {
                FactionCaptureEvent factionCaptureEvent = (FactionCaptureEvent)m_Queue.Dequeue();
                factionCaptureEvent.Delete();
            }

            CurrentCaptureEvent = null;

            //Prevent New Event Immediately Occuring: Will Require Schedule Realignment
            if (DateTime.UtcNow >= FactionPersistance.NextScheduledCaptureEventStartTime)
            {
                FactionPersistance.NextScheduledCaptureEventStartTime = DateTime.UtcNow + TimeSpan.FromDays(365);
            }
        }