예제 #1
0
파일: Quest.cs 프로젝트: erekos3/mooege
 public QuestObjective(Mooege.Common.MPQ.FileFormats.QuestStepObjective objective, QuestStep questStep, int id)
 {
     //Logger.Debug(" (QuestObjective ctor) creating an objective with ID {0}, QuestStepObjective {1} and QuestStep ID {2}", id, objective.Group1Name, questStep.QuestStepID);
     ID = id;
     this.objective = objective;
     this.questStep = questStep;
 }
예제 #2
0
파일: Quest.cs 프로젝트: xPathin/DiIiS-
 public QuestObjective(Mooege.Common.MPQ.FileFormats.QuestStepObjective objective, QuestStep questStep, int id)
 {
     Logger.Debug(" (QuestObjective ctor) creating an objective with ID {0}, QuestStepObjective {1} and QuestStep ID {2}", id, objective.Group1Name, questStep.QuestStepID);
     ID             = id;
     this.objective = objective;
     this.questStep = questStep;
 }
예제 #3
0
파일: Quest.cs 프로젝트: DZilli/mooege
                public QuestObjective(Game game, Mooege.Common.MPQ.FileFormats.QuestStepObjective objective, QuestStep questStep, int id)
                {
                    ID             = id;
                    this.objective = objective;
                    this.questStep = questStep;
                    this.game      = game;

                    //TODO: Rewrite all this as quests should subscribe to events and not objects notify quests
                    if (this.objective.ObjectiveType == Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillGroup)
                    {
                        logger.Debug("KillGroup objective");
                        foreach (var world in game._worlds.Values)
                        {
                            //subscribe to each actor in group destroy/kill event
                            var spawnerGroupActors = world.GetActorsInGroup(this.objective.Group1Name);
                            //
                            foreach (var actor in spawnerGroupActors)
                            {
                                if (actor is Spawner)
                                {
                                    (actor as Spawner).Spawn();
                                }
                            }

                            var groupActors = world.GetActorsInGroup(this.objective.Group1Name);
                            foreach (var actor in groupActors)
                            {
                                actor.ActorKilled += new EventHandler(actor_ActorKilled);
                            }
                        }
                    }
                    if (this.objective.ObjectiveType == Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillMonster)
                    {
                    }
                }
예제 #4
0
파일: Quest.cs 프로젝트: vrobel/mooege
                public QuestObjective(Game game, Mooege.Common.MPQ.FileFormats.QuestStepObjective objective, QuestStep questStep, int id)
                {
                    ID = id;
                    this.objective = objective;
                    this.questStep = questStep;
                    this.game = game;

                    //TODO: Rewrite all this as quests should subscribe to events and not objects notify quests
                    if (this.objective.ObjectiveType == Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillGroup)
                    {
                        logger.Debug("KillGroup objective");
                        foreach( var world in game._worlds.Values)
                        {
                            //subscribe to each actor in group destroy/kill event
                            var spawnerGroupActors = world.GetActorsInGroup(this.objective.Group1Name);
                            //
                            foreach (var actor in spawnerGroupActors)
                            {
                                if (actor is Spawner)
                                {
                                    (actor as Spawner).Spawn();
                                }

                            }

                            var groupActors = world.GetActorsInGroup(this.objective.Group1Name);
                            foreach (var actor in groupActors)
                            {
                                actor.ActorKilled += new EventHandler(actor_ActorKilled);
                            }
                        }                        
                    }
                    if (this.objective.ObjectiveType == Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillMonster)
                    {
                    }
                }
예제 #5
0
 public QuestObjective(Mooege.Common.MPQ.FileFormats.QuestStepObjective objective, QuestStep questStep, int id)
 {
     ID             = id;
     this.objective = objective;
     this.questStep = questStep;
 }
예제 #6
0
파일: Quest.cs 프로젝트: 0v3rfl0w/mooege
 public QuestObjective(Mooege.Common.MPQ.FileFormats.QuestStepObjective objective, QuestStep questStep, int id)
 {
     ID = id;
     this.objective = objective;
     this.questStep = questStep;
 }