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 );
}
}