Esempio n. 1
0
        /// <summary>
        /// Remove the given questpart from the quest and also unregister the handlers
        /// </summary>
        /// <param name="questPart">QuestPart to be removed</param>
        public static void RemoveBehaviour(QuestBehaviour questPart)
        {
            if (QuestParts == null)
            {
                return;
            }

            UnRegisterBehaviour(questPart);
            QuestParts.Remove(questPart);
        }
Esempio n. 2
0
        /// <summary>
        /// Adds the given questpart to the quest depending on the added triggers it will either
        /// be added as InteractQuestPart as NotifyQuestPart or both and also register the needed event handler.
        /// </summary>
        /// <param name="questPart">QuestPart to be added</param>
        public static void AddBehaviour(QuestBehaviour questPart)
        {
            if (QuestParts == null)
            {
                QuestParts = new ArrayList();
            }

            if (!QuestParts.Contains(questPart))
            {
                QuestParts.Add(questPart);
            }

            questPart.ID = QuestParts.Count; // fake id but ids only have to be unique quest wide its enough to use the number in the list as id.
        }