当前位置: 首页>>代码示例>>C#>>正文


C# PacketWriter.GetBytes方法代码示例

本文整理汇总了C#中Framework.PacketWriter.GetBytes方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.GetBytes方法的具体用法?C# PacketWriter.GetBytes怎么用?C# PacketWriter.GetBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Framework.PacketWriter的用法示例。


在下文中一共展示了PacketWriter.GetBytes方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DisbandGuildMsgEnd

 public static byte[] DisbandGuildMsgEnd()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_DISBAND_MSG);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:GuildSystemPackets.cs

示例2: LeaveStall

 public static byte[] LeaveStall()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_STALL_OTHER_CLOSE);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:StallSystemPackets.cs

示例3: ConnectSuccess

 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Connection success
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 public static byte[] ConnectSuccess()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_CONNECTION);   // Select opcode
     Writer.Bool(true);                          // Writer bool = 1 True
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:10,代码来源:LoginPackets.cs

示例4: PrivateMessageRespond

 //Packet for response of message sending
 public static byte[] PrivateMessageRespond(byte type)
 {
     //Create new packet writer
     PacketWriter Writer = new PacketWriter();
     //Add the opcode to the packet
     Writer.Create(Systems.SERVER_PM_SEND);
     //Switch on type sended by our function
     switch (type)
     {
         case 1:
             //Failed
             Writer.Byte(0x02);
             Writer.Byte(0x0D);
             Writer.Byte(0x64);
             break;
         case 2:
             //Success
             Writer.Byte(0x01);
             break;
         case 3:
             //Inbox full
             Writer.Byte(2);
             Writer.Word(0x6414);
             break;
     }
     //Return all bytes to the void
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:29,代码来源:PrivateMessages.cs

示例5: GuildLeave

 public static byte[] GuildLeave()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_LEAVE);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:GuildSystemPackets.cs

示例6: GuildKick

 public static byte[] GuildKick(int memberid)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_DISBAND);
     Writer.DWord(memberid);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:GuildSystemPackets.cs

示例7: LeaveJob

 public static byte[] LeaveJob()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_LEAVE_JOB);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:JobSystemPackets.cs

示例8: CloseNPC

 public static byte[] CloseNPC()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_CLOSE_NPC);
     Writer.Bool(true);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:NpcPackets.cs

示例9: CancelLeaveGame

 public static byte[] CancelLeaveGame()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_LEAVE_CALCEL);
     Writer.Bool(true);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:LeaveGamePackets.cs

示例10: GuildKickMsg

 public static byte[] GuildKickMsg()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_GUILD_KICK);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:GuildSystemPackets.cs

示例11: Exchange_Accept

 public static byte[] Exchange_Accept()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_EXCHANGE_ACCEPT);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:ExchangePackets.cs

示例12: UpdatePlace

 public static byte[] UpdatePlace()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_SAVE_PLACE);
     Writer.Byte(1);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:TeleportPackets.cs

示例13: CloseExhangeWindow

 public static byte[] CloseExhangeWindow()
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_EXCHANGE_CLOSE);
     Writer.Bool(true);
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:7,代码来源:ExchangePackets.cs

示例14: CreateFormedParty

 public static byte[] CreateFormedParty(party pt)
 {
     //Create new packet writer
     PacketWriter Writer = new PacketWriter();
     //Add opcode to packet
     Writer.Create(Systems.SERVER_FORMED_PARTY_CREATED);
     //Static byte
     Writer.Byte(1);
     //Party id
     Writer.DWord(pt.ptid);
     //0 Dword value
     Writer.DWord(0);
     //Party type
     Writer.Byte(pt.Type);
     //Party purpose
     Writer.Byte(pt.ptpurpose);
     //Party min level required
     Writer.Byte(pt.minlevel);
     //Party max level allowed
     Writer.Byte(pt.maxlevel);
     //Party name
     Writer.Text3(pt.partyname);
     //Return all bytes to send
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:25,代码来源:JoinPackets.cs

示例15: PetSpawn

 ///////////////////////////////////////////////////////////////////////////
 // Despawn Pet
 ///////////////////////////////////////////////////////////////////////////
 public static byte[] PetSpawn(int petid, byte type, pet_obj o)
 {
     PacketWriter Writer = new PacketWriter();
     Writer.Create(Systems.SERVER_PLAYER_SPAWN_PET);   //Select Opcode
     Writer.DWord(petid);                              //Pet ID
     switch (type)
     {
         case 1:
             //Despawn pet
             Writer.Byte(1);
             break;
         case 2:
             //Rename pet respawn
             Writer.Byte(5);
             Writer.Text(o.Petname);
             break;
         case 3:
             //Attack pet respawn for exp info
             Writer.Byte(3);//Static
             Writer.LWord(o.exp);//New exp
             Writer.DWord(o.OwnerID);//Owner id
             break;
     }
     return Writer.GetBytes();
 }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:28,代码来源:GrabpetPackets.cs


注:本文中的Framework.PacketWriter.GetBytes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。