예제 #1
0
        internal byte[] GetBytes()
        {
            MemoryStream TemporaryStream = new MemoryStream();

            TemporaryStream.Write(HabboEncoding.EncodeInt32((int)Buffer.Length), 0, 4);
            TemporaryStream.Write(Buffer.ToArray(), 0, (int)Buffer.Length);

            return(TemporaryStream.ToArray());
        }
예제 #2
0
        internal int PopWiredInt32()
        {
            if (this.RemainingLength < 1)
            {
                return(0);
            }
            byte[] v      = this.PlainReadBytes(4);
            int    result = HabboEncoding.DecodeInt32(v);

            checked
            {
                this.Pointer += 4;
                return(result);
            }
        }
예제 #3
0
 internal void AppendUInt(uint i)
 {
     Buffer.Write(HabboEncoding.EncodeUInt(i), 0, 4);
 }
예제 #4
0
 internal void AppendInt32(int i)
 {
     Buffer.Write(HabboEncoding.EncodeInt32(i), 0, 4);
 }
예제 #5
0
 internal void AppendShort(int S)
 {
     Buffer.Write(HabboEncoding.EncodeInt16(S), 0, 2);
 }
예제 #6
0
        internal byte[] ReadFixedValue()
        {
            int bytes = HabboEncoding.DecodeInt16(this.ReadBytes(2));

            return(this.ReadBytes(bytes));
        }