Beispiel #1
0
        /// <summary>
        /// Gets the reversed bytes.
        /// </summary>
        /// <returns>System.Byte[].</returns>
        public byte[] GetReversedBytes()
        {
            var final = new List <byte>();

            final.AddRange(BitConverter.GetBytes(CMessage.Count));
            final.Reverse();
            final.AddRange(_message);

            if (Plus.DebugMode)
            {
                Console.ForegroundColor = ConsoleColor.DarkBlue;
                Console.WriteLine();
                Console.Write("OUTGOING ");
                Console.ForegroundColor = ConsoleColor.DarkGreen;
                Console.Write("PREPARED ");
                Console.ForegroundColor = ConsoleColor.DarkGray;
                Console.Write(Id + Environment.NewLine +
                              HabboEncoding.GetCharFilter(Plus.GetDefaultEncoding().GetString(final.ToArray())));
                Console.WriteLine();
            }

            return(final.ToArray());
        }
Beispiel #2
0
 /// <summary>
 /// Returns a <see cref="System.String" /> that represents this instance.
 /// </summary>
 /// <returns>A <see cref="System.String" /> that represents this instance.</returns>
 public override string ToString()
 {
     return(HabboEncoding.GetCharFilter(Plus.GetDefaultEncoding().GetString(GetReversedBytes())));
 }