コード例 #1
0
ファイル: BaseQuest.cs プロジェクト: Los-Ojos/DOLSharp-1127
        /// <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);
        }
コード例 #2
0
ファイル: BaseQuest.cs プロジェクト: Los-Ojos/DOLSharp-1127
        // Base QuestPart methods

        /// <summary>
        /// Remove all registered handlers for this quest,
        /// this will not remove the questPart from the quest.
        /// </summary>
        /// <param name="questPart">QuestPart to remove handlers from</param>
        protected static void UnRegisterBehaviour(QuestBehaviour questPart)
        {
            if (questPart.Triggers == null)
            {
                return;
            }

            foreach (IBehaviourTrigger trigger in questPart.Triggers)
            {
                trigger.Unregister();
            }
        }
コード例 #3
0
ファイル: BaseQuest.cs プロジェクト: Los-Ojos/DOLSharp-1127
        /// <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.
        }
コード例 #4
0
ファイル: QuestBuilder.cs プロジェクト: mynew4/DAoC
 public QuestBehaviour CreateBehaviour(GameNPC npc, int maxExecutions)
 {
     QuestBehaviour questPart = new QuestBehaviour(questType, npc,maxExecutions);
     return questPart;
 }
コード例 #5
0
ファイル: QuestBuilder.cs プロジェクト: mynew4/DAoC
 public QuestBehaviour CreateBehaviour(GameNPC npc)
 {
     QuestBehaviour questPart =  new QuestBehaviour(questType, npc);
     return questPart;
 }
コード例 #6
0
ファイル: QuestBuilder.cs プロジェクト: mynew4/DAoC
 public void AddBehaviour(QuestBehaviour questPart)
 {
     addActionMethod.Invoke(null, new object[] { questPart });
 }
コード例 #7
0
ファイル: BaseQuest.cs プロジェクト: mynew4/DAoC
        // Base QuestPart methods
        /// <summary>
        /// Remove all registered handlers for this quest,
        /// this will not remove the questPart from the quest.
        /// </summary>
        /// <param name="questPart">QuestPart to remove handlers from</param>
        protected static void UnRegisterBehaviour(QuestBehaviour questPart)
        {
            if (questPart.Triggers == null)
                return;

            foreach (IBehaviourTrigger trigger in questPart.Triggers)
            {
                trigger.Unregister();
            }
        }
コード例 #8
0
ファイル: BaseQuest.cs プロジェクト: mynew4/DAoC
        /// <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);
        }
コード例 #9
0
ファイル: BaseQuest.cs プロジェクト: mynew4/DAoC
        /// <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.
        }
コード例 #10
0
        public QuestBehaviour CreateBehaviour(GameNPC npc, int maxExecutions)
        {
            QuestBehaviour questPart = new QuestBehaviour(questType, npc, maxExecutions);

            return(questPart);
        }
コード例 #11
0
        public QuestBehaviour CreateBehaviour(GameNPC npc)
        {
            QuestBehaviour questPart = new QuestBehaviour(questType, npc);

            return(questPart);
        }
コード例 #12
0
 public void AddBehaviour(QuestBehaviour questPart)
 {
     addActionMethod.Invoke(null, new object[] { questPart });
 }