本文整理汇总了C#中Server.Network.PacketReader.Trace方法的典型用法代码示例。如果您正苦于以下问题:C# PacketReader.Trace方法的具体用法?C# PacketReader.Trace怎么用?C# PacketReader.Trace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Network.PacketReader
的用法示例。
在下文中一共展示了PacketReader.Trace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnHandshakeResponse
private static void OnHandshakeResponse(NetState state, PacketReader pvSrc)
{
pvSrc.Trace(state);
if (state == null || state.Mobile == null || !state.Running)
return;
Timer t;
Mobile m = state.Mobile;
if (m_Dictionary.TryGetValue(m, out t))
{
if (t != null)
t.Stop();
m_Dictionary.Remove(m);
}
}
示例2: OnPacket
public static void OnPacket( NetState state, PacketReader pvSrc )
{
MahjongGame game = World.FindItem( pvSrc.ReadInt32() ) as MahjongGame;
if ( game != null )
game.Players.CheckPlayers();
pvSrc.ReadByte();
int cmd = pvSrc.ReadByte();
OnMahjongPacketReceive onReceive = GetSubCommandDelegate( cmd );
if ( onReceive != null )
{
onReceive( game, state, pvSrc );
}
else
{
pvSrc.Trace( state );
}
}
示例3: MobileQuery2
public static void MobileQuery2(NetState state, PacketReader pvSrc)
{
Mobile from = state.Mobile;
pvSrc.ReadInt32(); // 0xEDEDEDED
int type = pvSrc.ReadByte();
Mobile m = World.FindMobile(pvSrc.ReadInt32());
if (m != null)
{
switch (type)
{
case 0x00: // Unknown, sent by godclient
{
if ( PacketHandlers.VerifyGC( state ) )
Console.WriteLine( "God Client: {0}: Query 0x{1:X2} on {2} '{3}'", state, type, m.Serial, m.Name );
break;
}
case 0x04: // Stats
{
m.OnStatsQuery( from );
break;
}
case 0x05:
{
m.SendGump( new TMSS.ParallelSkillsGump( m ) );
break;
}
default:
{
pvSrc.Trace( state );
break;
}
}
}
}
示例4: NewAnimData
public static void NewAnimData( NetState state, PacketReader pvSrc )
{
if ( VerifyGC( state ) )
{
Console.WriteLine( "God Client: {0}: New tile animation", state );
pvSrc.Trace( state );
}
}
示例5: GMSingle
public static void GMSingle( NetState state, PacketReader pvSrc )
{
if ( VerifyGC( state ) )
pvSrc.Trace( state );
}
示例6: GameCentralMoniter
public static void GameCentralMoniter( NetState state, PacketReader pvSrc )
{
if ( VerifyGC( state ) )
{
int type = pvSrc.ReadByte();
int num1 = pvSrc.ReadInt32();
Console.WriteLine( "God Client: {0}: Game central moniter", state );
Console.WriteLine( " - Type: {0}", type );
Console.WriteLine( " - Number: {0}", num1 );
pvSrc.Trace( state );
}
}
示例7: EncodedCommand
public static void EncodedCommand( NetState state, PacketReader pvSrc )
{
IEntity e = World.FindEntity( pvSrc.ReadInt32() );
int packetID = pvSrc.ReadUInt16();
EncodedPacketHandler ph = GetEncodedHandler( packetID );
if ( ph != null )
{
if ( ph.Ingame && state.Mobile == null )
{
Console.WriteLine( "Client: {0}: Sent ingame packet (0xD7x{1:X2}) before having been attached to a mobile", state, packetID );
state.Dispose();
}
else if ( ph.Ingame && state.Mobile.Deleted )
{
state.Dispose();
}
else
{
ph.OnReceive( state, e, new EncodedReader( pvSrc ) );
}
}
else
{
pvSrc.Trace( state );
}
}
示例8: PartyMessage
public static void PartyMessage( NetState state, PacketReader pvSrc )
{
if ( state.Mobile == null )
return;
switch ( pvSrc.ReadByte() )
{
case 0x01: PartyMessage_AddMember( state, pvSrc ); break;
case 0x02: PartyMessage_RemoveMember( state, pvSrc ); break;
case 0x03: PartyMessage_PrivateMessage( state, pvSrc ); break;
case 0x04: PartyMessage_PublicMessage( state, pvSrc ); break;
case 0x06: PartyMessage_SetCanLoot( state, pvSrc ); break;
case 0x08: PartyMessage_Accept( state, pvSrc ); break;
case 0x09: PartyMessage_Decline( state, pvSrc ); break;
default: pvSrc.Trace( state ); break;
}
}
示例9: ExtendedCommand
public static void ExtendedCommand( NetState state, PacketReader pvSrc )
{
int packetID = pvSrc.ReadUInt16();
PacketHandler ph = GetExtendedHandler( packetID );
if ( ph != null )
{
if ( ph.Ingame && state.Mobile == null )
{
Console.WriteLine( "Client: {0}: Sent ingame packet (0xBFx{1:X2}) before having been attached to a mobile", state, packetID );
state.Dispose();
}
else if ( ph.Ingame && state.Mobile.Deleted )
{
state.Dispose();
}
else
{
ph.OnReceive( state, pvSrc );
}
}
else
{
pvSrc.Trace( state );
}
}
示例10: NewAnimData
public static void NewAnimData( NetState state, PacketReader pvSrc )
{
if ( VerifyGC( state ) )
{
log.InfoFormat("God Client: {0}: New tile animation", state);
pvSrc.Trace( state );
}
}
示例11: GameCentralMoniter
public static void GameCentralMoniter( NetState state, PacketReader pvSrc )
{
if ( VerifyGC( state ) )
{
int type = pvSrc.ReadByte();
int num1 = pvSrc.ReadInt32();
log.InfoFormat("God Client: {0}: Game central moniter; Type={1} Number={2}",
state, type, num1);
pvSrc.Trace( state );
}
}
示例12: MobileQuery
public static void MobileQuery( NetState state, PacketReader pvSrc )
{
Mobile from = state.Mobile;
pvSrc.ReadInt32(); // 0xEDEDEDED
int type = pvSrc.ReadByte();
Mobile m = World.FindMobile( pvSrc.ReadInt32() );
if ( m != null )
{
switch ( type )
{
case 0x00: // Unknown, sent by godclient
{
if ( VerifyGC( state ) )
log.InfoFormat("God Client: {0}: Query 0x{1:X2} on {2} '{3}'",
state, type, m.Serial, m.Name);
break;
}
case 0x04: // Stats
{
m.OnStatsQuery( from );
break;
}
case 0x05:
{
m.OnSkillsQuery( from );
break;
}
default:
{
pvSrc.Trace( state );
break;
}
}
}
}
示例13: OnHandshakeResponse
private static void OnHandshakeResponse( NetState state, PacketReader pvSrc )
{
pvSrc.Trace( state );
if ( state == null || state.Mobile == null || !state.Running )
return;
Mobile m = state.Mobile;
Timer t = null;
if ( m_Table.Contains( m ) )
{
t = m_Table[m] as Timer;
if ( t != null )
t.Stop();
m_Table.Remove( m );
}
}
示例14: OnHandshakeResponse
private static void OnHandshakeResponse(NetState state, PacketReader pvSrc)
{
pvSrc.Trace(state);
if (state == null || state.Mobile == null || !state.Running)
{
return;
}
Mobile m = state.Mobile;
if (!_Dictionary.ContainsKey(m))
{
return;
}
Timer t = _Dictionary[m];
if (t != null)
{
t.Stop();
}
_Dictionary.Remove(m);
}
示例15: GMSingle
public void GMSingle( GameClient state, PacketReader pvSrc )
{
if ( VerifyGC( state ) )
pvSrc.Trace( state );
}