本文整理汇总了C#中Framework.PacketWriter.String方法的典型用法代码示例。如果您正苦于以下问题:C# PacketWriter.String方法的具体用法?C# PacketWriter.String怎么用?C# PacketWriter.String使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Framework.PacketWriter
的用法示例。
在下文中一共展示了PacketWriter.String方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StallBuyItem2
public static byte[] StallBuyItem2(string charname, byte stallslot, List<stall.stallItem> ItemList)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_STALL_PLAYERUPDATE);
Writer.Byte(3);
Writer.Byte(stallslot);
Writer.Word(charname.Length);
Writer.String(charname);
StallItemPacket(ItemList, Writer);
return Writer.GetBytes();
}
示例2: PartyRequest
public static byte[] PartyRequest(byte Type, int id, byte type)
{
//Create new packet writer
PacketWriter Writer = new PacketWriter();
//Add opcode
Writer.Create(Systems.SERVER_PARTY_REQUEST);
//Write type byte
Writer.Byte(Type);
//Create switch on type
switch (Type)
{
case 6:
//Union invite
Writer.DWord(id);
break;
case 5:
//Guild invitation
Writer.DWord(id);
Systems InvitedPlayer = Systems.GetPlayer(id);
Writer.Word(InvitedPlayer.Character.Information.Name.Length);
Writer.String(InvitedPlayer.Character.Information.Name);
Writer.Word(InvitedPlayer.Character.Network.Guild.Name.Length);
Writer.String(InvitedPlayer.Character.Network.Guild.Name);
break;
case 2:
//Party invite
Writer.DWord(id);
Writer.Byte(type);
break;
case 1:
//Exchange invite
Writer.DWord(id);
break;
}
return Writer.GetBytes();
}
示例3: GuildSetTitle2
public static byte[] GuildSetTitle2(int guildid, int charid, string title)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_GUILD_SET_TITLE2);
Writer.Byte(1);
Writer.DWord(guildid);
Writer.DWord(charid);
Writer.Word(title.Length);
Writer.String(title);
return Writer.GetBytes();
}
示例4: SendGuildInfo
public static byte[] SendGuildInfo(guild guildGlobal)
{
PacketWriter Writer = new PacketWriter();
/////////////////////////////////////////////////////////////////////////
//Opcode information
/////////////////////////////////////////////////////////////////////////
Writer.Create(Systems.SERVER_GUILD_INFO_LOAD);
/////////////////////////////////////////////////////////////////////////
//Packet Structure
/////////////////////////////////////////////////////////////////////////
//Writer.Byte(1); // Guild update
Writer.DWord(guildGlobal.Guildid); // Unique Guild ID
Writer.Text(guildGlobal.Name); // Guild Name
Writer.Byte(guildGlobal.Level); // Guild level
Writer.DWord(guildGlobal.PointsTotal); // Guild GP
Writer.Word(guildGlobal.NewsTitle.Length); // Guild Message Title Lenght
Writer.String(guildGlobal.NewsTitle); // Guild Message Title
Writer.Word(guildGlobal.NewsMessage.Length); // Guild Message Lenght
Writer.String(guildGlobal.NewsMessage); // Guild Message
Writer.DWord(0); // War on guild id
Writer.Byte(0); // War status?
/////////////////////////////////////////////////////////////////////////
// Write Guild Member information for each excisting member.
/////////////////////////////////////////////////////////////////////////
Guild_ListPlayersInfo(guildGlobal.MembersInfo, Writer);
Writer.Byte(0);
return Writer.GetBytes();
}