public static void EnsureExistence()
 {
     if (m_Instance == null)
     {
         m_Instance = new SpawnPersistence();
     }
 }
Esempio n. 2
0
        public static void Initialize()
        {
            if (m_RemoveList != null)
            {
                foreach (IEntity ent in m_RemoveList)
                {
                    ent.Delete();
                }

                m_RemoveList = null;
            }

            SpawnPersistence.EnsureExistence();

            CommandSystem.Register("RespawnAllRegions", AccessLevel.Administrator, new CommandEventHandler(RespawnAllRegions_OnCommand));
            CommandSystem.Register("RespawnRegion", AccessLevel.GameMaster, new CommandEventHandler(RespawnRegion_OnCommand));
            CommandSystem.Register("DelAllRegionSpawns", AccessLevel.Administrator, new CommandEventHandler(DelAllRegionSpawns_OnCommand));
            CommandSystem.Register("DelRegionSpawns", AccessLevel.GameMaster, new CommandEventHandler(DelRegionSpawns_OnCommand));
            CommandSystem.Register("StartAllRegionSpawns", AccessLevel.Administrator, new CommandEventHandler(StartAllRegionSpawns_OnCommand));
            CommandSystem.Register("StartRegionSpawns", AccessLevel.GameMaster, new CommandEventHandler(StartRegionSpawns_OnCommand));
            CommandSystem.Register("StopAllRegionSpawns", AccessLevel.Administrator, new CommandEventHandler(StopAllRegionSpawns_OnCommand));
            CommandSystem.Register("StopRegionSpawns", AccessLevel.GameMaster, new CommandEventHandler(StopRegionSpawns_OnCommand));
        }
 public SpawnPersistence(Serial serial) : base(serial)
 {
     m_Instance = this;
 }