本文整理汇总了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();
}
示例2: LeaveStall
public static byte[] LeaveStall()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_STALL_OTHER_CLOSE);
Writer.Byte(1);
return Writer.GetBytes();
}
示例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();
}
示例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();
}
示例5: GuildLeave
public static byte[] GuildLeave()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_GUILD_LEAVE);
Writer.Byte(1);
return Writer.GetBytes();
}
示例6: GuildKick
public static byte[] GuildKick(int memberid)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_GUILD_DISBAND);
Writer.DWord(memberid);
return Writer.GetBytes();
}
示例7: LeaveJob
public static byte[] LeaveJob()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_LEAVE_JOB);
Writer.Byte(1);
return Writer.GetBytes();
}
示例8: CloseNPC
public static byte[] CloseNPC()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_CLOSE_NPC);
Writer.Bool(true);
return Writer.GetBytes();
}
示例9: CancelLeaveGame
public static byte[] CancelLeaveGame()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_LEAVE_CALCEL);
Writer.Bool(true);
return Writer.GetBytes();
}
示例10: GuildKickMsg
public static byte[] GuildKickMsg()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_GUILD_KICK);
Writer.Byte(1);
return Writer.GetBytes();
}
示例11: Exchange_Accept
public static byte[] Exchange_Accept()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_EXCHANGE_ACCEPT);
Writer.Byte(1);
return Writer.GetBytes();
}
示例12: UpdatePlace
public static byte[] UpdatePlace()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_SAVE_PLACE);
Writer.Byte(1);
return Writer.GetBytes();
}
示例13: CloseExhangeWindow
public static byte[] CloseExhangeWindow()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_EXCHANGE_CLOSE);
Writer.Bool(true);
return Writer.GetBytes();
}
示例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();
}
示例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();
}