예제 #1
0
 protected QuestObjectiveInfo Talk(string target)
 {
     var result = new QuestObjectiveInfo();
     result.Type = ObjectiveType.Talk;
     result.Target = target;
     return result;
 }
예제 #2
0
 protected QuestObjectiveInfo ReachLevel(uint level)
 {
     var result = new QuestObjectiveInfo();
     result.Type = ObjectiveType.ReachLevel;
     result.Id = level;
     return result;
 }
예제 #3
0
파일: QuestScript.cs 프로젝트: pjm0616/aura
        public void AddObjective(string ident, string description, bool unlocked, uint region, uint x, uint y, QuestObjectiveInfo info)
        {
            foreach (string o in this.Info.Objectives.Keys)
            {
                if (o == ident)
                {
                    Logger.Warning("Multiple objectives with the same name ({1}) found in quest '{0}'. All but the first one will be ignored.", this.Id, ident);
                    return;
                }
            }

            info.Description = description;
            info.Unlocked = unlocked;

            info.Region = region;
            info.X = x;
            info.Y = y;

            // Subscribe to KilledByPlayer once for this quest, if needed for this objective.
            if (info.Type == ObjectiveType.Kill)
            {
                EventManager.PlayerEvents.KilledByPlayer -= this.OnKilledByPlayer;
                EventManager.PlayerEvents.KilledByPlayer += this.OnKilledByPlayer;
            }

            // Subscribe to OnCreatureItemAction once for this quest, if needed for this objective.
            if (info.Type == ObjectiveType.Collect)
            {
                EventManager.CreatureEvents.CreatureItemAction -= this.OnCreatureItemAction;
                EventManager.CreatureEvents.CreatureItemAction += this.OnCreatureItemAction;
            }

            this.Info.Objectives.Add(ident, info);
        }
예제 #4
0
 protected QuestObjectiveInfo ReachRank(SkillConst skillId, SkillRank rank)
 {
     var result = new QuestObjectiveInfo();
     result.Type = ObjectiveType.ReachRank;
     result.Id = (uint)skillId;
     result.Amount = (uint)rank;
     return result;
 }
예제 #5
0
 protected QuestObjectiveInfo Kill(uint amount, params uint[] races)
 {
     var result = new QuestObjectiveInfo();
     result.Type = ObjectiveType.Kill;
     result.Races.AddRange(races);
     result.Amount = amount;
     return result;
 }
예제 #6
0
 protected QuestObjectiveInfo Deliver(string target, uint itemId)
 {
     var result = new QuestObjectiveInfo();
     result.Type = ObjectiveType.Deliver;
     result.Target = target;
     result.Id = itemId;
     return result;
 }
예제 #7
0
 protected QuestObjectiveInfo Collect(uint itemId, uint amount)
 {
     var result = new QuestObjectiveInfo();
     result.Type = ObjectiveType.Collect;
     result.Id = itemId;
     result.Amount = amount;
     return result;
 }
예제 #8
0
파일: QuestScript.cs 프로젝트: pjm0616/aura
 public void AddObjective(string ident, string description, uint region, uint x, uint y, QuestObjectiveInfo info)
 {
     this.AddObjective(ident, description, false, region, x, y, info);
 }