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


C# Packet.SetStatic方法代碼示例

本文整理匯總了C#中Server.Network.Packet.SetStatic方法的典型用法代碼示例。如果您正苦於以下問題:C# Packet.SetStatic方法的具體用法?C# Packet.SetStatic怎麽用?C# Packet.SetStatic使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Network.Packet的用法示例。


在下文中一共展示了Packet.SetStatic方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Initialize

        public static void Initialize()
        {
            m_OldEFHandler = PacketHandlers.GetHandler(0xEF);
            PacketHandlers.Register(0xEF, 21, false, new Server.Network.OnPacketReceive(LoginServerSeed));
            PacketHandlers.Register(Config.EncapsulationHeader, 0, false, new Server.Network.OnPacketReceive(UOExtPacket));

            uint ip = (uint)(BitConverter.ToInt32(IPAddress.Parse(Config.IP).GetAddressBytes(), 0));

            m_UOExtSupport = new UOExtSupport();
            m_UOExtSupport.SetStatic();

            m_handler = UOExt.PacketHandler.Instatinate();

            Console.WriteLine("UOExt: Adapter started.");
        }
開發者ID:WildGenie,項目名稱:uo-ext,代碼行數:15,代碼來源:UOExtAdapter.cs

示例2: SetStatic

 public static Packet SetStatic( Packet p )
 {
     p.SetStatic();
     return p;
 }
開發者ID:Leorgrium,項目名稱:runuo,代碼行數:5,代碼來源:Packets.cs

示例3: SendSingleClickTo

        public override void SendSingleClickTo( Mobile from )
        {
            if ( !IsMagic || !( m_Identified.Contains( from ) || from.AccessLevel > AccessLevel.Counselor ) )
            {
                base.SendSingleClickTo( from );
            }
            else
            {
                if ( m_MagicSingleClick == null )
                {
                    m_MagicSingleClick = new AsciiMessage( Serial, ItemID, MessageType.Label, 0x3B2, 3, "", BuildMagicSingleClick() );
                    m_MagicSingleClick.SetStatic();
                }

                from.NetState.Send( m_MagicSingleClick );
            }
        }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:17,代碼來源:BaseClothing.cs

示例4: SendSingleClickTo

        public virtual void SendSingleClickTo( Mobile from )
        {
            if ( m_SingleClick == null )
            {
                m_SingleClick = new AsciiMessage( Serial, ItemID, MessageType.Label, 0x3B2, 3, "", BuildSingleClick() );
                m_SingleClick.SetStatic();
            }

            from.NetState.Send( m_SingleClick );
        }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:10,代碼來源:BaseItem.cs

示例5: SendUpdateMsg

        private static void SendUpdateMsg( PlayerMobile m )
        {
            if ( !File.Exists( "update.txt" ) )
                return;

            DateTime time = File.GetLastWriteTimeUtc( "update.txt" );
            int ticks = (int)time.Ticks;
            if ( m.LastUpdate == ticks )
                return;

            if ( time != m_FileTime || m_Packet == null )
            {
                m_FileTime = time;
                Packet.Release( ref m_Packet );
                m_Packet = new ScrollMessage( 0x02, ticks, ReadFile( "update.txt" ) );
                m_Packet.SetStatic();
            }

            m.Send( m_Packet );
            m.LastUpdate = ticks;
        }
開發者ID:FreeReign,項目名稱:Rebirth-Repack,代碼行數:21,代碼來源:UpdatesGump.cs


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