public QuestStepObjectiveData(QuestData questData, QuestStepData questStepData, QuestStepObjective objective) { _questData = questData; _questStepData = questStepData; ObjectiveType = objective.ObjectiveType; ObjectiveTypeName = objective.ObjectiveType.ToString(); Name = objective.StepObjectiveName; }
public static QuestData GetQuestData(int 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 <int>(bountyInfo.LevelAreas.Select(la => (int)la)); questData.Waypoint = WaypointFactory.GetWaypointByLevelAreaId((int)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(); //} //Logger.Debug("[QuestData] Saving Quest {0} ({1})", questData.Name, questData.QuestId); //questData.Save(); return(questData); }
public static QuestData GetQuestData(int 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<int>(bountyInfo.LevelAreas.Select(la => (int)la)); questData.Waypoint = WaypointFactory.GetWaypointByLevelAreaId((int)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(); //} //Logger.Debug("[QuestData] Saving Quest {0} ({1})", questData.Name, questData.QuestId); //questData.Save(); return questData; }