/// <summary>
        /// Adds a compressable string.
        /// </summary>
        internal static void AddCompressableString(this ChecksumEncoder Writer, string Value)
        {
            if (Value != null)
            {
                int length = Value.Length;

                if (length > 50)
                {
                    Writer.AddBoolean(true);
                    Writer.AddCompressedString(Value);
                }
                else
                {
                    Writer.AddBoolean(false);
                    Writer.AddString(Value);
                }
            }
            else
            {
                Writer.AddBoolean(false);
                Writer.AddInt(-1);
            }
        }
 /// <summary>
 /// Encodes this instance.
 /// </summary>
 internal override void Encode(ChecksumEncoder Packet)
 {
     base.Encode(Packet);
     Packet.AddInt(this.Diamonds);
 }
Exemple #3
0
 /// <summary>
 /// Encodes this instance.
 /// </summary>
 internal void Encode(ChecksumEncoder Packet)
 {
     Packet.AddInt(this.Seed);
 }