示例#1
0
 public QuestPrerequisiteNot(QuestPrerequisite prerequiste)
 {
     _prereq = prerequiste;
 }
示例#2
0
		/// <summary>
		/// Adds prerequisite that has to be met before auto receiving the quest.
		/// </summary>
		/// <param name="prerequisite"></param>
		protected void AddPrerequisite(QuestPrerequisite prerequisite)
		{
			this.Prerequisites.Add(prerequisite);

			if (prerequisite.Is(typeof(QuestPrerequisiteQuestCompleted)))
			{
				ChannelServer.Instance.Events.PlayerCompletesQuest -= this.OnPlayerCompletesQuest;
				ChannelServer.Instance.Events.PlayerCompletesQuest += this.OnPlayerCompletesQuest;
			}

			if (prerequisite.Is(typeof(QuestPrerequisiteReachedLevel)) || prerequisite.Is(typeof(QuestPrerequisiteReachedTotalLevel)))
			{
				ChannelServer.Instance.Events.CreatureLevelUp -= this.OnCreatureLevelUp;
				ChannelServer.Instance.Events.CreatureLevelUp += this.OnCreatureLevelUp;
			}

			if (prerequisite.Is(typeof(QuestPrerequisiteReachedRank)))
			{
				ChannelServer.Instance.Events.SkillRankChanged -= this.OnSkillRankChanged;
				ChannelServer.Instance.Events.SkillRankChanged += this.OnSkillRankChanged;
			}
		}
示例#3
0
文件: QuestScript.cs 项目: Vinna/aura
		/// <summary>
		/// Adds prerequisite that has to be met before auto receiving the quest.
		/// </summary>
		/// <param name="prerequisite"></param>
		protected void AddPrerequisite(QuestPrerequisite prerequisite)
		{
			this.Prerequisites.Add(prerequisite);

			if (prerequisite is QuestPrerequisiteQuestCompleted)
			{
				ChannelServer.Instance.Events.PlayerCompletesQuest -= this.OnPlayerCompletesQuest;
				ChannelServer.Instance.Events.PlayerCompletesQuest += this.OnPlayerCompletesQuest;
			}

			if (prerequisite is QuestPrerequisiteReachedLevel || prerequisite is QuestPrerequisiteReachedTotalLevel)
			{
				ChannelServer.Instance.Events.CreatureLevelUp -= this.OnCreatureLevelUp;
				ChannelServer.Instance.Events.CreatureLevelUp += this.OnCreatureLevelUp;
			}
		}
示例#4
0
		public QuestPrerequisiteNot(QuestPrerequisite prerequiste)
		{
			_prereq = prerequiste;
		}
示例#5
0
        /// <summary>
        /// Adds prerequisite that has to be met before auto receiving the quest.
        /// </summary>
        /// <param name="prerequisite"></param>
        protected void AddPrerequisite(QuestPrerequisite prerequisite)
        {
            this.Prerequisites.Add(prerequisite);

            if (prerequisite is QuestPrerequisiteQuestCompleted)
            {
                ChannelServer.Instance.Events.PlayerCompletesQuest -= this.OnPlayerCompletesQuest;
                ChannelServer.Instance.Events.PlayerCompletesQuest += this.OnPlayerCompletesQuest;
            }
        }