public override object Evaluate(List <string> args, ExpressionEvaluator evaluator, Character player, Creature target = null, CastedSpell spell = null) { AskEventArgs ea = new AskEventArgs(Expressions.GetStr(args[0], player, target, spell), args.Skip(1).ToList()); OnAskQuestion(player, ea); return(ea.Result); }
public override object Evaluate(List <string> args, ExpressionEvaluator evaluator, Creature player, Target target = null, CastedSpell spell = null, RollResults dice = null) { string question = Expressions.GetStr(args[0], player, target, spell); List <string> answers = args.Skip(1).ToList(); AskEventArgs ea = new AskEventArgs(question, answers); OnAskQuestion(player, ea); return(ea.Result); }
public static void OnAskQuestion(object sender, AskEventArgs ea) { AskQuestion?.Invoke(sender, ea); }