protected int SendBackNext(string text) { _result = new WaitableResult <int>(); Send(new NpcStateInfo { Type = NpcMessageType.Standard, Text = text, IsPrevious = true, IsNext = true }); _result.Wait(); return(_result.Value); }
protected string SendRequestText(string text) { _stringResult = new WaitableResult <string>(); Send(new NpcStateInfo { Type = NpcMessageType.RequestText, Text = text }); _stringResult.Wait(); return(_stringResult.Value); }
protected int SendChoice(string text) { _result = new WaitableResult <int>(); Send(new NpcStateInfo { Type = NpcMessageType.Choice, Text = text, IsPrevious = false, IsNext = false }); _result.Wait(); return(_result.Value); }
protected int SendRequestStyle(string text, params int[] styles) { _result = new WaitableResult <int>(); Send(new NpcStateInfo { Type = NpcMessageType.RequestStyle, Text = text, Styles = styles.ToList() }); _result.Wait(); return(_result.Value); }
protected int SendAcceptDeclineNoExit(string text) { _result = new WaitableResult <int>(); Send(new NpcStateInfo { Type = NpcMessageType.AcceptDeclineNoExit, Text = text }); _result.Wait(); return(_result.Value); }
protected int AskYesNo(string text) { _result = new WaitableResult <int>(); Send(new NpcStateInfo { Type = NpcMessageType.YesNo, Text = text }); _result.Wait(); return(_result.Value); }
private int SendBackOk() { mResult = new WaitableResult <int>(); using (Packet oPacket = mNpc.GetDialogPacket(mText, NpcMessageType.Standard, 1, 0)) { mCharacter.Client.Send(oPacket); } mText = string.Empty; mResult.Wait(); return(mResult.Value); }
private int AskAcceptDecline() { mResult = new WaitableResult <int>(); using (Packet oPacket = mNpc.GetDialogPacket(mText, NpcMessageType.AcceptDecline)) { mCharacter.Client.Send(oPacket); } mText = string.Empty; mResult.Wait(); return(mResult.Value); }
private int AskYesNo() { mResult = new WaitableResult <int>(); using (Packet oPacket = mNpc.GetDialogPacket(mText, NPCsConstants.NpcMessageType.YesNo)) { mCharacter.Client.Send(oPacket); } mText = string.Empty; mResult.Wait(); return(mResult.Value); }
protected int SendRequestNumber(string text, int numberDefault = 0, int numberMinimum = 0, int numberMaximum = 0) { _result = new WaitableResult <int>(); Send(new NpcStateInfo { Type = NpcMessageType.RequestNumber, Text = text, NumberDefault = numberDefault, NumberMinimum = numberMinimum, NumberMaximum = numberMaximum }); _result.Wait(); return(_result.Value); }