Example #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;
        }
Example #2
0
 public static void EnsureExistence()
 {
     if (m_Instance == null)
     {
         m_Instance = new MLQuestPersistence();
     }
 }
		public MLQuestPersistence( Serial serial ) : base( serial )
		{
			m_Instance = this;
		}
		public static void EnsureExistence()
		{
			if ( m_Instance == null )
				m_Instance = new MLQuestPersistence();
		}
Example #5
0
 public MLQuestPersistence(Serial serial) : base(serial)
 {
     m_Instance = this;
 }