示例#1
0
 /// <summary>
 /// Sends a dialog option.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="text">The text of the option.</param>
 /// <param name="option">The dialog option id.</param>
 public static void SendOption(Entities.GameClient client, string text, byte option)
 {
     using (var reply = new NPCResponsePacket(new StringPacker(text)))
     {
         reply.Action = Enums.NPCDialogAction.Link;
         reply.Option = option;
         client.Send(reply);
     }
 }
示例#2
0
 /// <summary>
 /// Sends the dialog text of an npc.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="text">The text.</param>
 public static void SendDialog(Entities.GameClient client, string text)
 {
     using (var reply = new NPCResponsePacket(new StringPacker(text)))
     {
         reply.Action = Enums.NPCDialogAction.Text;
         reply.Option = 255;
         client.Send(reply);
     }
 }
示例#3
0
 /// <summary>
 /// Sends a dialog inputbox.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="option">The dialog option id.</param>
 public static void SendInput(Entities.GameClient client, byte option)
 {
     using (var reply = new NPCResponsePacket(new StringPacker()))
     {
         reply.Action = Enums.NPCDialogAction.Edit;
         reply.Data   = 16;
         reply.Option = option;
         client.Send(reply);
     }
 }
示例#4
0
 /// <summary>
 /// Finishes the npc dialog.
 /// </summary>
 /// <param name="client">The client.</param>
 public static void Finish(Entities.GameClient client)
 {
     using (var reply = new NPCResponsePacket(new StringPacker()))
     {
         reply.Action = Enums.NPCDialogAction.Pic;
         reply.Data = client.CurrentNPC.Avatar;
         client.Send(reply);
     }
     using (var reply = new NPCResponsePacket(new StringPacker()))
     {
         reply.Action = Enums.NPCDialogAction.Create;
         reply.Option = 255;
         client.Send(reply);
     }
 }
示例#5
0
 /// <summary>
 /// Finishes the npc dialog.
 /// </summary>
 /// <param name="client">The client.</param>
 public static void Finish(Entities.GameClient client)
 {
     using (var reply = new NPCResponsePacket(new StringPacker()))
     {
         reply.Action = Enums.NPCDialogAction.Pic;
         reply.Data   = client.CurrentNPC.Avatar;
         client.Send(reply);
     }
     using (var reply = new NPCResponsePacket(new StringPacker()))
     {
         reply.Action = Enums.NPCDialogAction.Create;
         reply.Option = 255;
         client.Send(reply);
     }
 }
示例#6
0
 /// <summary>
 /// Sends a dialog option.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="text">The text of the option.</param>
 /// <param name="option">The dialog option id.</param>
 public static void SendOption(Entities.GameClient client, string text, byte option)
 {
     using (var reply = new NPCResponsePacket(new StringPacker(text)))
     {
         reply.Action = Enums.NPCDialogAction.Link;
         reply.Option = option;
         client.Send(reply);
     }
 }
示例#7
0
 /// <summary>
 /// Sends a dialog inputbox.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="option">The dialog option id.</param>
 public static void SendInput(Entities.GameClient client, byte option)
 {
     using (var reply = new NPCResponsePacket(new StringPacker()))
     {
         reply.Action = Enums.NPCDialogAction.Edit;
         reply.Data = 16;
         reply.Option = option;
         client.Send(reply);
     }
 }
示例#8
0
 /// <summary>
 /// Sends the dialog text of an npc.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="text">The text.</param>
 public static void SendDialog(Entities.GameClient client, string text)
 {
     using (var reply = new NPCResponsePacket(new StringPacker(text)))
     {
         reply.Action = Enums.NPCDialogAction.Text;
         reply.Option = 255;
         client.Send(reply);
     }
 }