本文整理汇总了C#中PacketWriter.Create方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.Create方法的具体用法?C# PacketWriter.Create怎么用?C# PacketWriter.Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketWriter
的用法示例。
在下文中一共展示了PacketWriter.Create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: ConnectWrong
public static byte[] ConnectWrong(ushort type)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_AUTH);
Writer.Word(type);
return Writer.GetBytes();
}
示例3: Clientok
public static byte[] Clientok()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_MAIN);
Writer.Word(0x0100);
return Writer.GetBytes();
}
示例4: 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();
}
示例5: ServerIsFull
public static byte[] ServerIsFull()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_AUTH);
Writer.Byte(0x02);
Writer.Byte(0x04);
return Writer.GetBytes();
}
示例6: AllreadyConnected
public static byte[] AllreadyConnected()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_AUTH);
Writer.Byte(0x02);
Writer.Byte(0x03);
return Writer.GetBytes();
}
示例7: GateWayPacket
public static byte[] GateWayPacket()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_INFO);
Writer.Text("GatewayServer");
Writer.Byte(0);
return Writer.GetBytes();
}
示例8: UserFail
public static byte[] UserFail(byte _code)
{
PacketWriter pack = new PacketWriter();
pack.Create(0x03);
pack.Byte(0x00);
pack.Byte(_code);
return pack.GetBytes();
}
示例9: LoadGame_5
public static byte[] LoadGame_5()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_MAIN);
Writer.Word(0x0101);
Writer.Word(0);
Writer.Byte(0xA1);
return Writer.GetBytes();
}
示例10: 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();
}
示例11: LoadGame_2
public static byte[] LoadGame_2()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(SERVER.SERVER_MAIN);
Writer.Word(0x0100);
Writer.Word(0x0100);
Writer.Byte(0x69);
Writer.Byte(0x0C);
Writer.DWord(0x00000005);
Writer.Byte(0x02);
return Writer.GetBytes();
}
示例12: 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();
}
示例13: 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();
}
示例14: 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();
}
示例15: 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();
}