本文整理汇总了C#中PacketWriter.Text方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.Text方法的具体用法?C# PacketWriter.Text怎么用?C# PacketWriter.Text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketWriter
的用法示例。
在下文中一共展示了PacketWriter.Text方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: News
public static byte[] News()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_MAIN);
Writer.Byte(0);
Writer.Byte((byte)Systems.News_List.Count);
foreach (NewsList n in Systems.News_List)
{
Writer.Text(n.Head);
Writer.Text(n.Msg);
Writer.Word(0);
Writer.Word(n.Month);
Writer.Word(n.Day);
Writer.Word(0);
Writer.LWord(0);
}
Writer.Word(0);
return Writer.GetBytes();
}
示例2: ServerListPacket
public static byte[] ServerListPacket(int cliVersion)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_SERVERLIST);
Writer.Word(0x0201);
Writer.Text("SRX_DARKEMU");
Writer.Byte(0);
foreach (KeyValuePair<int, Systems.SRX_Serverinfo> GS in Systems.GSList)
{
if (GS.Value.Version == 0 || cliVersion == GS.Value.Version)
{
Writer.Bool(true);
Writer.Word(GS.Value.id);
Writer.Text("1"+GS.Value.name);
Writer.Word(GS.Value.usedSlots);
Writer.Word(GS.Value.maxSlots);
Writer.Byte(GS.Value.status);
}
}
Writer.Byte(0);
return Writer.GetBytes();
}
示例3: GateWayPacket
public static byte[] GateWayPacket()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_INFO);
Writer.Text("GatewayServer");
Writer.Byte(0);
return Writer.GetBytes();
}
示例4: NoSuchUser
public static byte[] NoSuchUser()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(0xA102);
Writer.Byte(3);
Writer.Byte(0x0F);
Writer.Byte(2);
Writer.Text("[DARKEMU] Account not found");
return Writer.GetBytes();
}
示例5: ConnectSucces
public static byte[] ConnectSucces(string ip, ushort port, byte type)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_AUTH);
Writer.Byte(0x01);
Writer.DWord(0x1234); // Session
Writer.Text(ip);
Writer.Word(port);
//Console.WriteLine("Connect Succes to: Ip:{0} Port:{1}",ip,port);
return Writer.GetBytes();
}
示例6: BannedUser
public static byte[] BannedUser(string sReason)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_AUTH);
Writer.Byte(3);
Writer.Byte(0x0F);
Writer.Byte(2);
Writer.Text(string.Format("[DARKEMU] Banned: {0}", sReason));
Writer.Word(0);
return Writer.GetBytes();
}
示例7: SomethingWentWrong
public static byte[] SomethingWentWrong()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_AUTH);
Writer.Byte(3);
Writer.Byte(0x0F);
Writer.Byte(2);
Writer.Text("[DARKEMU]: Account not found");
Writer.Word(0);
return Writer.GetBytes();
}
示例8: WrongInformation
public byte[] WrongInformation()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_AUTH);
Writer.Byte(3);
Writer.Byte(0x0F);
Writer.Byte(2);
Writer.Text(string.Format("[DARKEMU]: Incorrect password: {0}/3 times.", WrongPassword));
Writer.Word(0);
return Writer.GetBytes();
}