Exemplo n.º 1
0
 public QuestStepObjectiveData(QuestData questData, QuestStepData questStepData, Zeta.Game.Internals.SNO.QuestStepObjective objective)
 {
     _questData        = questData;
     _questStepData    = questStepData;
     ObjectiveType     = objective.ObjectiveType;
     ObjectiveTypeName = objective.ObjectiveType.ToString();
     Name = objective.StepObjectiveName;
 }
Exemplo n.º 2
0
 public QuestStepObjectiveData(QuestData questData, QuestStepData questStepData, QuestStepObjective objective)
 {
     _questData        = questData;
     _questStepData    = questStepData;
     ObjectiveType     = objective.ObjectiveType;
     ObjectiveTypeName = objective.ObjectiveType.ToString();
     Name = objective.StepObjectiveName;
 }
Exemplo n.º 3
0
        public static QuestData GetQuestData(SNOQuest questId)
        {
            var bountyInfo = GetBountyInfo(questId);
            var questData  = new QuestData();

            questData.QuestId = questId; //(int)bountyInfo.Quest;

            questData.Steps = new List <QuestStepData>();

            if (bountyInfo == null)
            {
                return(questData);
            }

            questData.Name         = bountyInfo.Info.DisplayName.Replace("Bounty: ", string.Empty);
            questData.InternalName = bountyInfo.Quest.ToString();
            questData.Act          = bountyInfo.Act;
            questData.ActName      = bountyInfo.Act.ToString();

            questData.LevelAreaIds = new HashSet <SNOLevelArea>(bountyInfo.LevelAreas);

            questData.Waypoint = WaypointFactory.GetWaypointByLevelAreaId(bountyInfo.StartingLevelArea);

            foreach (var step in bountyInfo.Info.QuestRecord.Steps)
            {
                var questStep = new QuestStepData(questData, step);
                questData.Steps.Add(questStep);
            }

            //if (questData.QuestType == BountyQuestType.Unknown)
            //{
            //    questData.QuestType = BountyQuestTypeFactory.GetQuestType(bountyInfo);
            //}

            //var bountyScripts = new BountyScripts();
            //if (bountyScripts.ContainsKey(questId))
            //{
            //    questData.BountyScript = bountyScripts[questId];
            //    questData.BountyScript.Reset();
            //}

            //Core.Logger.Debug("[QuestData] Saving Quest {0} ({1})", questData.Name, questData.QuestId);
            //questData.Save();
            return(questData);
        }