Ejemplo n.º 1
0
        public static void Initialize()
        {
            if (!Enabled)
            {
                return;
            }

            if (AutoGenerateNew)
            {
                foreach (MLQuest quest in Quests.Values)
                {
                    if (quest?.Deserialized == false)
                    {
                        quest.Generate();
                    }
                }
            }

            MLQuestPersistence.EnsureExistence();

            CommandSystem.Register("MLQuestsInfo", AccessLevel.Administrator, MLQuestsInfo_OnCommand);
            CommandSystem.Register("SaveQuest", AccessLevel.Administrator, SaveQuest_OnCommand);
            CommandSystem.Register("SaveAllQuests", AccessLevel.Administrator, SaveAllQuests_OnCommand);
            CommandSystem.Register("InvalidQuestItems", AccessLevel.Administrator, InvalidQuestItems_OnCommand);

            TargetCommands.Register(new ViewQuestsCommand());
            TargetCommands.Register(new ViewContextCommand());

            EventSink.QuestGumpRequest += EventSink_QuestGumpRequest;
        }
Ejemplo n.º 2
0
 public static void EnsureExistence()
 {
     if (m_Instance == null)
     {
         m_Instance = new MLQuestPersistence();
     }
 }
Ejemplo n.º 3
0
		public MLQuestPersistence( Serial serial ) : base( serial )
		{
			m_Instance = this;
		}
Ejemplo n.º 4
0
		public static void EnsureExistence()
		{
			if ( m_Instance == null )
				m_Instance = new MLQuestPersistence();
		}
Ejemplo n.º 5
0
 public MLQuestPersistence(Serial serial) : base(serial)
 {
     m_Instance = this;
 }