本文整理汇总了C#中PacketReader.ReadSlot方法的典型用法代码示例。如果您正苦于以下问题:C# PacketReader.ReadSlot方法的具体用法?C# PacketReader.ReadSlot怎么用?C# PacketReader.ReadSlot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketReader
的用法示例。
在下文中一共展示了PacketReader.ReadSlot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnPlayerBlockPlacement
public void OnPlayerBlockPlacement(ref PacketReader _pReader, PacketType pt, ref ClientManager _client)
{
PlayerBlockPlacementPacket p = new PlayerBlockPlacementPacket(PacketType.PlayerBlockPlacement);
p.X = _pReader.ReadInt();
p.Y = _pReader.ReadByte();
p.Z = _pReader.ReadInt();
p.Direction = _pReader.ReadByte();
p.BlockID = _pReader.ReadSlot();
//if (p.BlockID.s_short <= -1)
//{
p.Amount = _pReader.ReadByte();
p.Damage = _pReader.ReadShort();
//}
GridServer.player_list[_client.id].WaitToRead = false;
p.BuildPacket();
PacketReader pr = new PacketReader(new System.IO.MemoryStream(p.GetBytes()));
int i = 0;
for (; i < base.ModuleAddons.Count; i++)
{
base.ModuleAddons.ElementAt(i).Value(pt, ModuleAddons.ElementAt(i).Key, ref pr, (PacketHandler)p, ref _client);
}
}
示例2: OnCreativeInventory
public void OnCreativeInventory(ref PacketReader _pReader, PacketType pt, ref ClientManager _client)
{
CreateInventoryPacket cip = new CreateInventoryPacket(PacketType.CreativeInventory);
cip.Slot = _pReader.ReadSlot();
_client.WaitToRead = false;
}