SetStatic() public static method

public static SetStatic ( Packet p ) : Packet
p Packet
return Packet
コード例 #1
0
ファイル: UOExtAdapter.cs プロジェクト: WildGenie/uo-ext
        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.");
        }
コード例 #2
0
ファイル: UOExtAdapter.cs プロジェクト: WildGenie/uo-ext
        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.");
        }
コード例 #3
0
ファイル: Packets.cs プロジェクト: Leorgrium/runuo
 public static Packet SetStatic( Packet p )
 {
     p.SetStatic();
     return p;
 }
コード例 #4
0
        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 );
            }
        }
コード例 #5
0
 public static Packet SetStatic(Packet p)
 {
     p.SetStatic();
     return(p);
 }
コード例 #6
0
ファイル: BaseItem.cs プロジェクト: FreeReign/Rebirth-Repack
        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 );
        }
コード例 #7
0
        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;
        }