當前位置: 首頁>>代碼示例>>C#>>正文


C# PacketReader.Trace方法代碼示例

本文整理匯總了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);
                }
            }
開發者ID:felladrin,項目名稱:runuo-pt-br,代碼行數:18,代碼來源:Assistants.cs

示例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 );
			}
		}
開發者ID:FreeReign,項目名稱:imaginenation,代碼行數:22,代碼來源:MahjongPacketHandlers.cs

示例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;
					}
				}
			}
		}
開發者ID:greeduomacro,項目名稱:unknown-shard-1,代碼行數:37,代碼來源:SkillReplacement.cs

示例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 );
			}
		}
開發者ID:Grimoric,項目名稱:RunUO.2.3.r1083,代碼行數:9,代碼來源:PacketHandlers.cs

示例5: GMSingle

		public static void GMSingle( NetState state, PacketReader pvSrc )
		{
			if ( VerifyGC( state ) )
				pvSrc.Trace( state );
		}
開發者ID:Grimoric,項目名稱:RunUO.2.3.r1083,代碼行數:5,代碼來源:PacketHandlers.cs

示例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 );
			}
		}
開發者ID:Grimoric,項目名稱:RunUO.2.3.r1083,代碼行數:14,代碼來源:PacketHandlers.cs

示例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 );
			}
		}
開發者ID:Grimoric,項目名稱:RunUO.2.3.r1083,代碼行數:28,代碼來源:PacketHandlers.cs

示例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;
			}
		}
開發者ID:Grimoric,項目名稱:RunUO.2.3.r1083,代碼行數:17,代碼來源:PacketHandlers.cs

示例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 );
			}
		}
開發者ID:Grimoric,項目名稱:RunUO.2.3.r1083,代碼行數:27,代碼來源:PacketHandlers.cs

示例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 );
			}
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:9,代碼來源:PacketHandlers.cs

示例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 );
			}
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:13,代碼來源:PacketHandlers.cs

示例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;
					}
				}
			}
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:38,代碼來源:PacketHandlers.cs

示例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 );
            }
        }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:19,代碼來源:RazorNegotiator.cs

示例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);
			}
開發者ID:Crome696,項目名稱:ServUO,代碼行數:25,代碼來源:Assistants.cs

示例15: GMSingle

 public void GMSingle( GameClient state, PacketReader pvSrc )
 {
     if ( VerifyGC( state ) )
         pvSrc.Trace( state );
 }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:5,代碼來源:PacketHandlers.cs


注:本文中的Server.Network.PacketReader.Trace方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。