public QuestPrerequisiteNot(QuestPrerequisite prerequiste) { _prereq = prerequiste; }
/// <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; } }
/// <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; } }
/// <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; } }