本文整理汇总了C#中System.IO.PacketReader.ReadRawUInt64方法的典型用法代码示例。如果您正苦于以下问题:C# PacketReader.ReadRawUInt64方法的具体用法?C# PacketReader.ReadRawUInt64怎么用?C# PacketReader.ReadRawUInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.PacketReader
的用法示例。
在下文中一共展示了PacketReader.ReadRawUInt64方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunUOProtocolExtention
private static void RunUOProtocolExtention(PacketReader p, PacketHandlerEventArgs args)
{
args.Block = true;
switch (p.ReadByte())
{
case 1: // Custom Party information
{
Serial serial;
PacketHandlers.SpecialPartyReceived++;
while ((serial = p.ReadUInt32()) > 0)
{
Mobile mobile = World.FindMobile(serial);
short x = p.ReadInt16();
short y = p.ReadInt16();
byte map = p.ReadByte();
if (mobile == null)
{
World.AddMobile( mobile = new Mobile(serial) );
mobile.Visible = false;
}
if ( mobile.Name == null || mobile.Name.Length <= 0 )
mobile.Name = "(Not Seen)";
if ( !m_Party.Contains( serial ) )
m_Party.Add( serial );
if ( map == World.Player.Map )
mobile.Position = new Point3D(x, y, mobile.Position.Z);
else
mobile.Position = Point3D.Zero;
}
if (Engine.MainWindow.MapWindow != null)
Engine.MainWindow.MapWindow.UpdateMap();
break;
}
case 0xFE: // Begin Handshake/Features Negotiation
{
ulong features = p.ReadRawUInt64();
if ( ClientCommunication.HandleNegotiate( features ) != 0 )
{
ClientCommunication.SendToServer( new RazorNegotiateResponse() );
Engine.MainWindow.UpdateControlLocks();
}
break;
}
}
}