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()); }
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); } }
internal void AppendUInt(uint i) { Buffer.Write(HabboEncoding.EncodeUInt(i), 0, 4); }
internal void AppendInt32(int i) { Buffer.Write(HabboEncoding.EncodeInt32(i), 0, 4); }
internal void AppendShort(int S) { Buffer.Write(HabboEncoding.EncodeInt16(S), 0, 2); }
internal byte[] ReadFixedValue() { int bytes = HabboEncoding.DecodeInt16(this.ReadBytes(2)); return(this.ReadBytes(bytes)); }