/// <summary> /// Notifies the objective, that an event occured. The objective checks if that event matches the event it waits for /// </summary> public void Notify(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { if (type != objective.ObjectiveType) { return; } switch (type) { case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterWorld: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterScene: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillMonster: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.CompleteQuest: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.HadConversation: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterLevelArea: if (value == objective.SNOName1.Id) { Counter++; questStep.UpdateCounter(this); } break; case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterTrigger: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EventReceived: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.GameFlagSet: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillGroup: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PlayerFlagSet: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PossessItem: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.TimedEventExpired: throw new NotImplementedException(); } }
/// <summary> /// Call this, to trigger quest progress if a certain event has occured /// </summary> public void Notify(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { foreach (var quest in quests.Values) { (quest as QuestProgressHandler).Notify(type, value); } }
public void Notify(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { if (CurrentStep != null) { CurrentStep.Notify(type, value); } }
/// <summary> /// Notifies the objective (if it is flagged as abonus objective), that an event occured. The objective checks if that event matches the event it waits for /// </summary> public void NotifyBonus(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { Logger.Debug(" (NotifyBonus) objective details SNOName 1 : {0}, ID {1} \n SNOName 2 : {2},ID {3} ", objective.SNOName1.Name, objective.SNOName1.Id, objective.SNOName2.Name, objective.SNOName2.Id); Logger.Debug(" (NotifyBonus) in QuestObjective for type {0} and value {1} and objective.ObjectiveType is {2}", type, value, objective.ObjectiveType); //if (type != objective.ObjectiveType) return; switch (type) { case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.BonusStep: { Counter++; questStep.UpdateBonusCounter(this); } break; case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterWorld: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterScene: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillMonster: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.CompleteQuest: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.HadConversation: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterLevelArea: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterTrigger: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EventReceived: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.GameFlagSet: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillGroup: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PlayerFlagSet: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PossessItem: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.TimedEventExpired: throw new NotImplementedException(); } }
public void NotifyBonus(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { if (CurrentStep != null) { //Logger.Debug(" NotifyBonus through Quest impl for type {0} and value {1} ", type, value); CurrentStep.NotifyBonus(type, value); } }
public void Notify(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { foreach (var objectiveSet in ObjectivesSets) { foreach (var objective in objectiveSet.Objectives) { objective.Notify(type, value); } } }
public void NotifyBonus(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { foreach (var bonus_objective_set in bonusObjectives) { foreach (var bonus_objective in bonus_objective_set) { //Logger.Debug(" NotifyBonus through QuestStep impl for type {0} and value {1} ", type, value); bonus_objective.NotifyBonus(type, value); } } }
///// <summary> ///// Debug method. ///// </summary> ///// <param name="snoQuest">snoID of the quest to check</param> //public void UpdateBonus(int snoQuest, int taskID) //{ // Logger.Debug(" UpdateBonus Quest {0} in step {1}, special bonus task is {3} ", snoQuest, Quests[snoQuest].CurrentStep.QuestStepID, taskID); //} /// <summary> /// Call this, to trigger quest progress in bonus objectives for certain event occured /// </summary> public void NotifyBonus(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { Logger.Debug(" NotifyBonus through QuestManager for type {0} and value {1} ", type, value); foreach (var quest in Quests.Values) { if (!quest.IsDone()) //do not notify ended quest :p { (quest as QuestProgressHandler).NotifyBonus(type, value); } } }
public void Notify(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { // Logger.Debug(" Current QuestStepID is {0} ", CurrentStep.QuestStepID); if (CurrentStep != null) { //Logger.Debug(" Notify through Quest impl for type {0} and value {1} ", type, value); CurrentStep.Notify(type, value); } else { Logger.Debug(" CurrentStep is NULL !!"); } }
/// <summary> /// Notifies the objective, that an event occured. The objective checks if that event matches the event it waits for /// </summary> public void Notify(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { if (type != objective.ObjectiveType) { return; } switch (type) { case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterWorld: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterScene: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillMonster: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.CompleteQuest: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.HadConversation: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterLevelArea: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EventReceived: { if (value == objective.SNOName1.Id) { Logger.Debug(" %%%%%%% AN EVENT OCCURED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "); Logger.Debug(" (Notify) objective SNOName1 Name : {0}, Id {1}, Valid {2} ", objective.SNOName1.Name, objective.SNOName1.Id, objective.SNOName1.IsValid); Logger.Debug(" (Notify) objective SNOName2 Name : {0}, Id {1}, Valid {2} ", objective.SNOName2.Name, objective.SNOName2.Id, objective.SNOName2.IsValid); Logger.Debug(" (Notify) objective Group1Name : {0} ", objective.Group1Name); Logger.Debug(" (Notify) objective I0 : {0} ", objective.I0); Logger.Debug(" (Notify) objective I2 : {0} ", objective.I2); Logger.Debug(" (Notify) objective I4 : {0} ", objective.I4); Logger.Debug(" (Notify) objective I5 : {0} ", objective.I5); Logger.Debug(" -> (Notify) objectiveType : {0} ", objective.ObjectiveType); Logger.Debug(" (Notify) objective GBID1 : {0} ", objective.GBID1); Logger.Debug(" (Notify) objective GBID2 : {0} ", objective.GBID2); Logger.Debug(" (Notify) NOW CALLING UPDATE COUNTER "); Counter++; questStep.UpdateCounter(this); } break; } case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterTrigger: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.GameFlagSet: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillGroup: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PlayerFlagSet: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PossessItem: case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.TimedEventExpired: throw new NotImplementedException(); } }
public void Notify(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { foreach (var objectiveSet in ObjectivesSets) { foreach (var objective in objectiveSet.Objectives) { //Logger.Debug(" Notify through QuestStep impl for type {0} and value {1} ", type, value); if (objective != null) { objective.Notify(type, value); } else { Logger.Debug(" an objective was null ..."); } } } }
/// <summary> /// Call this, to trigger quest progress if a certain event has occured /// </summary> public void NotifyQuest(int snoQuest, Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value) { Logger.Debug(" (NotifyQuest) through QuestManager for quest {2}, type {0} and value {1} ", type, value, snoQuest); Quests[snoQuest].Notify(type, value); }