Exemplo n.º 1
0
        public void Read(ClientWrapper state, MSGBuffer buffer, object[] Arguments)
        {
            string Locale       = buffer.ReadString();
            byte   ViewDistance = (byte)buffer.ReadByte();
            byte   ChatFlags    = (byte)buffer.ReadByte();
            bool   ChatColours  = buffer.ReadBool();
            byte   SkinParts    = (byte)buffer.ReadByte();

            state.Player.Locale       = Locale;
            state.Player.ViewDistance = ViewDistance;
            state.Player.ChatColours  = ChatColours;
            state.Player.ChatFlags    = ChatFlags;
            state.Player.SkinParts    = SkinParts;
        }
Exemplo n.º 2
0
        public void Read(ClientWrapper state, MSGBuffer buffer, object[] Arguments)
        {
            int    Protocol = buffer.ReadVarInt();
            string Host     = buffer.ReadString();
            short  Port     = buffer.ReadShort();
            int    State    = buffer.ReadVarInt();

            switch (State)
            {
            case 1:
                HandleStatusRequest(state, buffer);
                break;

            case 2:
                HandleLoginRequest(state, buffer);
                break;
            }
        }