private KnuBotAction TreeCondition01(KnuBotOptionId knuBotOptionId) { switch (knuBotOptionId) { case KnuBotOptionId.DialogStart: return(this.Dialog1); case KnuBotOptionId.Option1: return(this.Option01_1); case KnuBotOptionId.Option2: return(this.Option01_2); } return(null); }
private KnuBotAction TreeCondition0(KnuBotOptionId id) { switch (id) { case KnuBotOptionId.DialogStart: return(this.StartDialog); case KnuBotOptionId.Option1: return(this.Option0_1); case KnuBotOptionId.Option2: return(this.Option0_2); } return(null); }
private KnuBotAction TreeCondition0(KnuBotOptionId id) { switch (id) { case KnuBotOptionId.DialogStart: return(this.MainDialog); case KnuBotOptionId.Option1: return(this.ChatCommands); case KnuBotOptionId.Option2: return(this.GoodBye); } return(null); }
private KnuBotAction QLCondition(KnuBotOptionId id) { if (id == KnuBotOptionId.DialogStart) { return(this.ShowQLs); } int[] qls = this.selectedSet.GetQLs(); if (((int)id >= 0) && ((int)id < qls.Length)) { this.selectedQL = qls[(int)id]; return(this.GiveItemSet); } if ((int)id == qls.Length) { return(this.BackToRoot); } return(null); }
private KnuBotAction ConditionSL(KnuBotOptionId id) { if (id == KnuBotOptionId.DialogStart) { return(this.DialogShowSLArmorSets); } if (((int)id >= 0) && ((int)id < this.SLArmorSets.Count)) { this.selectedSet = this.SLArmorSets[(int)id]; return(this.ChooseQlFromSet); } if ((int)id == this.SLArmorSets.Count) { return(this.BackToRoot); } // Error if you encounter this line! return(this.BackToRoot); }
private KnuBotAction Condition0(KnuBotOptionId id) { this.isGM = this.GetCharacter().Stats[StatIds.gmlevel].Value > 0; switch (id) { case KnuBotOptionId.DialogStart: return(this.DialogGM0); case KnuBotOptionId.Option1: return(this.TransferToRKArmorSet); case KnuBotOptionId.Option2: return(this.TransferToSLArmorSet); case KnuBotOptionId.Option3: return(this.GoodBye); } return(null); }
/// <summary> /// </summary> /// <param name="optionId"> /// </param> /// <returns> /// </returns> public string Execute(KnuBotOptionId optionId = KnuBotOptionId.DialogStart) { string nextDialogId = string.Empty; if (this.Character != null) { KnuBotAction action = this.condition(optionId); if (action != null) { string actionId = action.Method.Name; if (actionId != string.Empty) { // Execute Action // No checks for empty results here, since we did this all in the Validate method already this.knuBotActions.Where(x => x.ActionId == actionId).Select(x => x.BotAction).First()(); nextDialogId = this.knuBotActions.First(x => x.ActionId == actionId).NextDialogId; } } } return(nextDialogId); }
private KnuBotAction QLCondition(KnuBotOptionId id) { if (id == KnuBotOptionId.DialogStart) { return this.ShowQLs; } int[] qls = this.selectedSet.GetQLs(); if (((int)id >= 0) && ((int)id < qls.Length)) { this.selectedQL = qls[(int)id]; return this.GiveItemSet; } if ((int)id == qls.Length) { return this.BackToRoot; } return null; }
private KnuBotAction ConditionSL(KnuBotOptionId id) { if (id == KnuBotOptionId.DialogStart) { return this.DialogShowSLArmorSets; } if (((int)id >= 0) && ((int)id < this.SLArmorSets.Count)) { this.selectedSet = this.SLArmorSets[(int)id]; return this.ChooseQlFromSet; } if ((int)id == this.SLArmorSets.Count) { return this.BackToRoot; } // Error if you encounter this line! return this.BackToRoot; }
private KnuBotAction Condition0(KnuBotOptionId id) { this.isGM = this.GetCharacter().Stats[StatIds.gmlevel].Value > 0; switch (id) { case KnuBotOptionId.DialogStart: return this.DialogGM0; case KnuBotOptionId.Option1: return this.TransferToRKArmorSet; case KnuBotOptionId.Option2: return this.TransferToSLArmorSet; case KnuBotOptionId.Option3: return this.GoodBye; } return null; }
/// <summary> /// </summary> /// <param name="id"> /// </param> public void Answer(KnuBotOptionId id) { this.Answer((int)id); }
/// <summary> /// </summary> /// <param name="optionId"> /// </param> /// <returns> /// </returns> public string Execute(KnuBotOptionId optionId = KnuBotOptionId.DialogStart) { string nextDialogId = string.Empty; if (this.Character != null) { KnuBotAction action = this.condition(optionId); if (action != null) { string actionId = action.Method.Name; if (actionId != string.Empty) { // Execute Action // No checks for empty results here, since we did this all in the Validate method already this.knuBotActions.Where(x => x.ActionId == actionId).Select(x => x.BotAction).First()(); nextDialogId = this.knuBotActions.First(x => x.ActionId == actionId).NextDialogId; } } } return nextDialogId; }
private KnuBotAction TreeCondition01(KnuBotOptionId knuBotOptionId) { switch (knuBotOptionId) { case KnuBotOptionId.DialogStart: return this.Dialog1; case KnuBotOptionId.Option1: return this.Option01_1; case KnuBotOptionId.Option2: return this.Option01_2; } return null; }
private KnuBotAction TreeCondition0(KnuBotOptionId id) { switch (id) { case KnuBotOptionId.DialogStart: return this.StartDialog; case KnuBotOptionId.Option1: return this.Option0_1; case KnuBotOptionId.Option2: return this.Option0_2; } return null; }
private KnuBotAction TreeCondition02(KnuBotOptionId optionId) { return(this.Dialog02); }
private KnuBotAction TreeCondition02(KnuBotOptionId optionId) { return this.Dialog02; }
private KnuBotAction TreeCondition0(KnuBotOptionId id) { switch (id) { case KnuBotOptionId.DialogStart: return this.MainDialog; case KnuBotOptionId.Option1: return this.ChatCommands; case KnuBotOptionId.Option2: return this.GoodBye; } return null; }