Esempio n. 1
0
        public static void AsciiSpeech( Packet p, PacketHandlerEventArgs args )
        {
            // 0, 1, 2
            Serial serial = p.ReadUInt32(); // 3, 4, 5, 6
            ushort body = p.ReadUInt16(); // 7, 8
            MessageType type = (MessageType)p.ReadByte(); // 9
            ushort hue = p.ReadUInt16(); // 10, 11
            ushort font = p.ReadUInt16();
            string name = p.ReadStringSafe( 30 );
            string text = p.ReadStringSafe();

            if ( World.Player != null && serial == Serial.Zero && body == 0 && type == MessageType.Regular && hue == 0xFFFF && font == 0xFFFF && name == "SYSTEM" )
            {
                args.Block = true;

                p.Seek( 3, SeekOrigin.Begin );
                p.WriteAsciiFixed( "", (int)p.Length-3 );

                ClientCommunication.DoFeatures( World.Player.Features ) ;
            }
            else
            {
                HandleSpeech( p, args, serial, body, type, hue, font, "A", name, text );

                if ( !serial.IsValid )
                    BandageTimer.OnAsciiMessage( text );
            }
        }
Esempio n. 2
0
        private static void ServerListLogin( Packet p, PacketHandlerEventArgs args )
        {
            m_LastPW = "";
            if ( !Config.GetBool( "RememberPwds" ) )
                return;

            World.AccountName = p.ReadStringSafe( 30 );
            string pass = p.ReadStringSafe( 30 );

            if ( pass == "" )
            {
                pass = PasswordMemory.Find( World.AccountName, ClientCommunication.LastConnection );
                if ( pass != null && pass != "" )
                {
                    p.Seek( 31, SeekOrigin.Begin );
                    p.WriteAsciiFixed( pass, 30 );
                    m_LastPW = pass;
                }
            }
            else
            {
                PasswordMemory.Add( World.AccountName, pass, ClientCommunication.LastConnection );
            }
        }
Esempio n. 3
0
        private static void GameLogin( Packet p, PacketHandlerEventArgs args )
        {
            int authID = p.ReadInt32();

            World.AccountName = p.ReadString( 30 );
            string password = p.ReadString( 30 );

            if ( password == "" && m_LastPW != "" && Config.GetBool( "RememberPwds" ) )
            {
                p.Seek( 35, SeekOrigin.Begin );
                p.WriteAsciiFixed( m_LastPW, 30 );
                m_LastPW = "";
            }
        }