本文整理汇总了C#中PacketWriter.DWord方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.DWord方法的具体用法?C# PacketWriter.DWord怎么用?C# PacketWriter.DWord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketWriter
的用法示例。
在下文中一共展示了PacketWriter.DWord方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: Patch
public void Patch()
{
//PacketReader Reader = new PacketReader(PacketInformation.buffer);
//Reader.Skip(1);
try
{
PacketWriter writer = new PacketWriter();
writer.Create(SERVER.SERVER_MAIN);
writer.DWord(0x05000101);
writer.Byte(0x20);
client.Send(writer.GetBytes());
writer.Create(SERVER.SERVER_MAIN);
writer.DWord(0x01000100);
writer.DWord(0x00050628);
writer.Word(0x00);
writer.Byte(0x02);
client.Send(writer.GetBytes());
writer.Create(SERVER.SERVER_MAIN);
writer.DWord(0x05000101);
writer.Byte(0x60);
client.Send(writer.GetBytes());
writer.Create(SERVER.SERVER_MAIN);
writer.DWord(0x02000300);
writer.Word(0x0200);
client.Send(writer.GetBytes());
writer.Create(SERVER.SERVER_MAIN);
writer.DWord(0x00000101);
writer.Byte(0xA1);
client.Send(writer.GetBytes());
writer.Create(SERVER.SERVER_MAIN);
writer.Word(0x0100);
client.Send(writer.GetBytes());
/*if (Reader.Text() == "SR_Client")
{
int version = Reader.Int32();
client.Version = version;
//We must keep the version equal to implent patch server later on in development.
//When a client isnt equal to our server information, disconnect or update.
if (version == LoginServer.Global.Versions.clientVersion)
{
client.Send(LoadGame_1());
client.Send(LoadGame_2());
client.Send(LoadGame_3());
client.Send(LoadGame_4());
client.Send(LoadGame_5());
client.Send(Clientok());
}
else
{
// client.Send(PatchRequest());
}
}*/
}
catch (Exception)
{
}
}