本文整理汇总了C#中PacketReader.MoveToData方法的典型用法代码示例。如果您正苦于以下问题:C# PacketReader.MoveToData方法的具体用法?C# PacketReader.MoveToData怎么用?C# PacketReader.MoveToData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PacketReader
的用法示例。
在下文中一共展示了PacketReader.MoveToData方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCompressedGump
private static void OnCompressedGump(PacketReader p, PacketHandlerEventArgs e)
{
p.MoveToData();
uint sender = p.ReadUInt32();
uint id = p.ReadUInt32();
if (id == gumpID)
{
responseID = sender;
e.Block = enabled;
}
}
示例2: OnFilter
public override void OnFilter( PacketReader p, PacketHandlerEventArgs args )
{
// completely skip this filter if we've been connected for more thn 1 minute
if ( ClientCommunication.ConnectionStart + TimeSpan.FromMinutes( 1.0 ) < DateTime.Now )
return;
try
{
p.Seek( 0, System.IO.SeekOrigin.Begin );
byte packetID = p.ReadByte();
p.MoveToData();
uint ser = p.ReadUInt32();
uint tid = p.ReadUInt32();
int x = p.ReadInt32();
int y = p.ReadInt32();
string layout = null;
if ( packetID == 0xDD )
{
layout = p.GetCompressedReader().ReadString();
}
else
{
ushort layoutLength = p.ReadUInt16();
layout = p.ReadString( layoutLength );
}
if ( layout != null && layout.IndexOf( m_VetRewardStr ) != -1 )
args.Block = true;
}
catch
{
}
}
示例3: ProcessViewers
private static bool ProcessViewers( ArrayList list, PacketReader p )
{
m_Args.Reinit();
if ( list != null )
{
for (int i=0;i<list.Count;i++)
{
p.MoveToData();
try
{
((PacketViewerCallback)list[i])( p, m_Args );
}
catch ( Exception e )
{
Engine.LogCrash( e );
new MessageDialog( "WARNING: Packet viewer exception!", true, e.ToString() ).Show();
}
}
}
return m_Args.Block;
}
示例4: OnCloseGump
private static void OnCloseGump(PacketReader p, PacketHandlerEventArgs e)
{
p.MoveToData();
if (p.ReadUInt16() == 4 && p.ReadUInt32() == gumpID)
responseID = 0;
}