本文整理汇总了C#中Zepheus.FiestaLib.Networking.Packet.FillPadding方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.FillPadding方法的具体用法?C# Packet.FillPadding怎么用?C# Packet.FillPadding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zepheus.FiestaLib.Networking.Packet
的用法示例。
在下文中一共展示了Packet.FillPadding方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteBasicCharInfo
public static void WriteBasicCharInfo(WorldCharacter wchar, Packet packet)
{
packet.WriteInt(wchar.Character.ID); //charid
packet.FillPadding(wchar.Character.Name, 0x10);
packet.WriteInt(0);//unk
packet.WriteShort((short)wchar.Character.CharLevel); //level
packet.WriteByte(wchar.Character.Slot);
MapInfo mapinfo;
if (!DataProvider.Instance.Maps.TryGetValue(wchar.Character.PositionInfo.Map, out mapinfo))
{
Log.WriteLine(LogLevel.Warn, "{0} has an invalid MapID ({1})", wchar.Character.Name, wchar.Character.PositionInfo.Map);
wchar.Character.PositionInfo.Map = 0;
packet.FillPadding(mapinfo.ShortName, 0x0D); //townname
}
else
{
packet.FillPadding(mapinfo.ShortName, 0x0D); //townname
}
//packet.WriteByte(0); // UNK
packet.WriteInt(0); // Random seed
WriteLook(wchar,packet);
WriteEquipment(wchar,packet);
WriteRefinement(wchar,packet);
packet.WriteByte(0);
packet.WriteByte(0xF0);
packet.WriteByte(0xFF);//unk
packet.WriteByte(0xFF);
packet.FillPadding(mapinfo.ShortName, 0x0c);
packet.WriteInt(0); //pos
packet.WriteInt(0); //pos
packet.WriteUShort(0xdb78);
packet.WriteUShort(4910);//unk
packet.WriteUShort(25600);
packet.Fill(4, 0);
}