예제 #1
0
            public QuestStep(Mooege.Common.MPQ.FileFormats.IQuestStep assetQuestStep, Quest quest)
            {
                _questStep = assetQuestStep;
                _quest     = quest;
                int c = 0;

                foreach (var objectiveSet in assetQuestStep.StepObjectiveSets)
                {
                    ObjectivesSets.Add(new ObjectiveSet()
                    {
                        FollowUpStepID = objectiveSet.FollowUpStepID,
                        Objectives     = new List <QuestObjective>(from objective in objectiveSet.StepObjectives select new QuestObjective(objective, this, c++))
                    });
                }
                c = 0;

                if (assetQuestStep is Mooege.Common.MPQ.FileFormats.QuestStep)
                {
                    var step = assetQuestStep as Mooege.Common.MPQ.FileFormats.QuestStep;

                    if (step.StepBonusObjectiveSets != null)
                    {
                        foreach (var objectiveSet in step.StepBonusObjectiveSets)
                        {
                            bonusObjectives.Add(new List <QuestObjective>(from objective in objectiveSet.StepBonusObjectives select new QuestObjective(objective, this, c++)));
                        }
                    }
                }
            }
예제 #2
0
파일: Quest.cs 프로젝트: xPathin/DiIiS-
            public QuestStep(Mooege.Common.MPQ.FileFormats.IQuestStep assetQuestStep, Quest quest)
            {
                _questStep = assetQuestStep;
                _quest     = quest;
                int c = 0;

                foreach (var objectiveSet in assetQuestStep.StepObjectiveSets)
                {
                    ObjectivesSets.Add(new ObjectiveSet()
                    {
                        FollowUpStepID = objectiveSet.FollowUpStepID,
                        Objectives     = new List <QuestObjective>(from objective in objectiveSet.StepObjectives select new QuestObjective(objective, this, c++))
                    });
                }
                c = 0;

                if (assetQuestStep is Mooege.Common.MPQ.FileFormats.QuestStep)
                {
                    var step = assetQuestStep as Mooege.Common.MPQ.FileFormats.QuestStep;

                    if (step.StepBonusObjectiveSets != null)
                    {
                        foreach (var objectiveSet in step.StepBonusObjectiveSets)
                        {
                            bonusObjectives.Add(new List <QuestObjective>(from objective in objectiveSet.StepBonusObjectives select new QuestObjective(objective, this, c++)));
                        }
                    }
                }

                Logger.Debug(" (questStep ctor) Displaying objectives sets for quest {0} in step {1} (if any) ", quest.SNOHandle, quest.CurrentStep);

                int i = 0;

                foreach (var objective_set in ObjectivesSets)
                {
                    Logger.Debug(" ObjectiveSet number {0}", i++);
                    foreach (var objective in objective_set.Objectives)
                    {
                        Logger.Debug("(questStep ctor) % objective has ID {0}, type {1}, value {2}, counter {4}, sub quest step {3} ", objective.ID, objective.ObjectiveType, objective.ObjectiveValue, objective.questStep.QuestStepID, objective.Counter);
                        Logger.Debug("(questStep ctor) % objective in string is {0}", objective.ToString());
                    }
                }

                Logger.Debug(" (questStep ctor) Displaying bonus objectives for quest {0} in step {1} (if any) ", quest.SNOHandle, quest.CurrentStep);

                i = 0;
                foreach (var bonus_objective_set in bonusObjectives)
                {
                    Logger.Debug(" Bonus Objective list number {0}", i++);
                    foreach (var bonus_objective in bonus_objective_set)
                    {
                        Logger.Debug("(questStep ctor) % bonus objective has ID {0}, type {1}, value {2}, counter {4}, sub quest step {3} ", bonus_objective.ID, bonus_objective.ObjectiveType, bonus_objective.ObjectiveValue, bonus_objective.questStep.QuestStepID, bonus_objective.Counter);
                        Logger.Debug("(questStep ctor) % bonus objective in string is {0}", bonus_objective.ToString());
                    }
                }
                Logger.Debug("(questStep ctor)  _questStep ID{0} ", _questStep.ID);
                //Logger.Debug("(questStep ctor)  _quest SNOHandle{0} CurrentStep Q", _quest.SNOHandle, _quest.CurrentStep.QuestStepID);
            }
예제 #3
0
파일: Quest.cs 프로젝트: 0v3rfl0w/mooege
            public QuestStep(Mooege.Common.MPQ.FileFormats.IQuestStep assetQuestStep, Quest quest)
            {
                _questStep = assetQuestStep;
                _quest = quest;
                int c = 0;

                foreach (var objectiveSet in assetQuestStep.StepObjectiveSets)
                    ObjectivesSets.Add(new ObjectiveSet()
                    {
                        FollowUpStepID = objectiveSet.FollowUpStepID,
                        Objectives = new List<QuestObjective>(from objective in objectiveSet.StepObjectives select new QuestObjective(objective, this, c++))
                    });
                c = 0;

                if (assetQuestStep is Mooege.Common.MPQ.FileFormats.QuestStep)
                {
                    var step = assetQuestStep as Mooege.Common.MPQ.FileFormats.QuestStep;

                    if (step.StepBonusObjectiveSets != null)
                        foreach (var objectiveSet in step.StepBonusObjectiveSets)
                            bonusObjectives.Add(new List<QuestObjective>(from objective in objectiveSet.StepBonusObjectives select new QuestObjective(objective, this, c++)));
                }
            }
예제 #4
0
파일: Quest.cs 프로젝트: erekos3/mooege
            public QuestStep(Mooege.Common.MPQ.FileFormats.IQuestStep assetQuestStep, Quest quest)
            {
                _questStep = assetQuestStep;
                _quest = quest;
                int c = 0;

                foreach (var objectiveSet in assetQuestStep.StepObjectiveSets)
                {
                    ObjectivesSets.Add(new ObjectiveSet()
                    {
                        FollowUpStepID = objectiveSet.FollowUpStepID,
                        Objectives = new List<QuestObjective>(from objective in objectiveSet.StepObjectives select new QuestObjective(objective, this, c++))
                    });                                        
                }
                c = 0;

                if (assetQuestStep is Mooege.Common.MPQ.FileFormats.QuestStep)
                {
                    var step = assetQuestStep as Mooege.Common.MPQ.FileFormats.QuestStep;

                    if (step.StepBonusObjectiveSets != null)
                        foreach (var objectiveSet in step.StepBonusObjectiveSets)
                        {                            
                            bonusObjectives.Add(new List<QuestObjective>(from objective in objectiveSet.StepBonusObjectives select new QuestObjective(objective, this, c++)));                            
                        }

                }

                if (quest.SNOHandle.Id == 72095)
                {
                    Logger.Debug(" (questStep ctor) Displaying objectives sets for quest {0}-{1}  in step {2} (if any) ", quest.SNOHandle.Id, quest.SNOHandle.Name, quest.CurrentStep);

                    int i = 0;
                    foreach (var objective_set in ObjectivesSets)
                    {
                        Logger.Debug(" ObjectiveSet number {0}", i++);
                        foreach (var objective in objective_set.Objectives)
                        {
                            Logger.Debug("(questStep ctor) % objective has ID {0}, type {1}, value {2}, counter {4}, sub quest step {3} ", objective.ID, objective.ObjectiveType, objective.ObjectiveValue, objective.questStep.QuestStepID, objective.Counter);
                            Logger.Debug("(questStep ctor) % objective in string is {0}", objective.ToString());
                        }
                    }

                    Logger.Debug(" (questStep ctor) Displaying bonus objectives for quest {0} in step {1} (if any) ", quest.SNOHandle, quest.CurrentStep);

                    i = 0;
                    foreach (var bonus_objective_set in bonusObjectives)
                    {
                        Logger.Debug(" Bonus Objective list number {0}", i++);
                        foreach (var bonus_objective in bonus_objective_set)
                        {
                            Logger.Debug("(questStep ctor) % bonus objective has ID {0}, type {1}, value {2}, counter {4}, sub quest step {3} ", bonus_objective.ID, bonus_objective.ObjectiveType, bonus_objective.ObjectiveValue, bonus_objective.questStep.QuestStepID, bonus_objective.Counter);
                            Logger.Debug("(questStep ctor) % bonus objective in string is {0}", bonus_objective.ToString());
                        }
                    }
                    Logger.Debug("(questStep ctor)  _questStep ID{0} ", _questStep.ID);
                    //Logger.Debug("(questStep ctor)  _quest SNOHandle{0} CurrentStep Q", _quest.SNOHandle, _quest.CurrentStep.QuestStepID);
                }
            }