Beispiel #1
0
 public static void EnsureExistence()
 {
     if (m_Instance == null)
     {
         m_Instance = new MLQuestPersistence();
     }
 }
        public static void Initialize()
        {
            if (!Enabled)
            {
                return;
            }

            if (AutoGenerateNew)
            {
                foreach (MLQuest quest in m_Quests.Values)
                {
                    if (quest != null && !quest.Deserialized)
                    {
                        quest.Generate();
                    }
                }
            }

            MLQuestPersistence.EnsureExistence();

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

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

            EventSink.QuestGumpRequest += new QuestGumpRequestHandler(EventSink_QuestGumpRequest);
        }
Beispiel #3
0
 public MLQuestPersistence(Serial serial) : base(serial)
 {
     m_Instance = this;
 }