Exemple #1
0
        public static void EventsController()
        {
            GameFiber.StartNew(delegate
            {
                Logger.LogTrivial(typeof(EventPool).Name, "Events controller started");

                while (true)
                {
                    GameFiber.Sleep(Globals.Random.Next(Settings.AmbientEvents.MinTimeAmbientEvent * 1000, Settings.AmbientEvents.MaxTimeAmbientEvent * 1000));
                    if (!EventPool.IsAnyEventRunning && !LSPD_First_Response.Mod.API.Functions.IsCalloutRunning())
                    {
                        EventPool.CreateEvent();
                    }
                }
            });
        }
Exemple #2
0
 public EventBase() : this(EventPool.GetSpawnPosition())
 {
 }