Exemplo n.º 1
0
        /// <summary>
        /// Encodes this instance.
        /// </summary>
        internal override void Encode(ChecksumEncoder Packet)
        {
            Packet.AddString(this.Sender);
            Packet.EncodeData(this.Data);

            base.Encode(Packet);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Encodes this instance.
        /// </summary>
        internal override void Encode(ChecksumEncoder Packet)
        {
            Packet.AddBoolean(false);
            Packet.AddVInt(this.Diamonds);
            Packet.AddString(null);

            base.Encode(Packet);
        }
        /// <summary>
        /// Encodes this instance.
        /// </summary>
        internal override void Encode(ChecksumEncoder Packet)
        {
            Packet.AddString(this.Name);
            Packet.AddVInt(this.NameChangeState);
            Packet.AddBoolean(this.NameSetByUser);

            base.Encode(Packet);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Encodes this instance.
        /// </summary>
        internal override void Encode(ChecksumEncoder Packet)
        {
            Packet.AddBoolean(this.Add);
            Packet.AddBoolean(false);
            Packet.AddBoolean(false);
            Packet.EncodeData(this.ArenaData);
            Packet.AddString(this.Name);

            base.Encode(Packet);
        }
Exemplo n.º 5
0
        /// <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);
            }
        }