本文整理汇总了C#中Framework.PacketWriter.Byte方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.Byte方法的具体用法?C# PacketWriter.Byte怎么用?C# PacketWriter.Byte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Framework.PacketWriter
的用法示例。
在下文中一共展示了PacketWriter.Byte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: InfoUpdate
public static byte[] InfoUpdate(byte type, int obje, byte bT)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_INFO_UPDATE);
Writer.Byte(type);
switch (type)
{
case 1:
Writer.LWord(obje);
Writer.Byte(0);
break;
case 2:
Writer.DWord(obje);
Writer.Byte(0);
break;
case 4:
Writer.Byte(bT);
Writer.DWord(obje);
break;
default:
break;
}
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: FriendData
public static byte[] FriendData(int target, byte type, string name, character c, bool state)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_FRIEND_DATA);
switch (type)
{
case 2:
//Friend invite accepted
Writer.Byte(2);
Writer.DWord(target); //Id
Writer.Text(c.Information.Name); //Name
Writer.DWord(c.Information.Model); //Model
break;
case 3:
//Remove friend from own list
Writer.Byte(3);
Writer.DWord(target);
break;
case 4:
//Fried online / offline update
Writer.Byte(4);
Writer.DWord(target);
Writer.Byte(state);
break;
case 5:
//Send private message..
Writer.Byte(8);
Writer.Text(name);
Writer.DWord(0);
Writer.DWord(0);//time info
break;
}
return Writer.GetBytes();
}
示例6: TeleportImage
public static byte[] TeleportImage(byte xsec, byte ysec)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_TELEPORTIMAGE);
Writer.Byte(xsec);
Writer.Byte(ysec);
return Writer.GetBytes();
}
示例7: FORTRESSNOTE
public static byte[] FORTRESSNOTE()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_FORTRESS_NOTIFY);
Writer.Byte(0);
Writer.Byte(0);
return Writer.GetBytes();
}
示例8: Exchange_Cancel
public static byte[] Exchange_Cancel()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_EXCHANGE_CANCEL);
Writer.Byte(0x2C);
Writer.Byte(0x18);
return Writer.GetBytes();
}
示例9: StallBuyItem
public static byte[] StallBuyItem(byte stallslot, short amount)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_STALL_BUY);
Writer.Byte(amount);
Writer.Byte(stallslot);
return Writer.GetBytes();
}
示例10: ActionState
public static byte[] ActionState(byte b1, byte b2)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_ACTIONSTATE);
Writer.Byte(b1);
Writer.Byte(b2);
return Writer.GetBytes();
}
示例11: AlchemyCancel
public static byte[] AlchemyCancel()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_ALCHEMY);
Writer.Byte(1);
Writer.Byte(1);
return Writer.GetBytes();
}
示例12: GuildCreateLow
public static byte[] GuildCreateLow()
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_GUILD);
Writer.Byte(2);
Writer.Byte(0xA);
Writer.Byte(0x4C);
return Writer.GetBytes();
}
示例13: StartingLeaveGame
public static byte[] StartingLeaveGame(byte time, byte type)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_LEAVE_ACCEPT);
Writer.Byte(1);
Writer.DWord(time);
Writer.Byte(type);
return Writer.GetBytes();
}
示例14: ChatIndexPacket
public static byte[] ChatIndexPacket(byte type, byte index)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_CHAT_INDEX);
Writer.Bool(true);
Writer.Byte(type);
Writer.Byte(index);
return Writer.GetBytes();
}
示例15: IngameMessages2
public static byte[] IngameMessages2(ushort opcode, ushort id)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(opcode);
Writer.Byte(3);
Writer.Byte(0);
Writer.Word(id);
return Writer.GetBytes();
}