/// <summary>
        /// Encodes this instance.
        /// </summary>
        internal void Encode(ByteStream Packet)
        {
            Packet.AddLogicLong(this._PlayerHighId, this._PlayerLowId);
            Packet.AddString(this._Name);
            Packet.EncodeData(this._Arena);
            Packet.AddVInt(this._Role);
            Packet.AddVInt(this._Level);
            Packet.AddVInt(this._Score);
            Packet.AddVInt(this._Donations);

            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);

            Packet.AddBoolean(false);
            Packet.AddBoolean(false);

            if (true)
            {
                Packet.AddBoolean(true);
                Packet.AddLogicLong(this._PlayerHighId, this._PlayerLowId);
            }
            else
            {
                Packet.AddBoolean(false);
            }
        }
예제 #2
0
 /// <summary>
 /// Encodes this instance.
 /// </summary>
 internal void Encode(ByteStream Packet)
 {
     Packet.AddLogicLong(this.HighID, this.LowID);
     Packet.AddLogicLong(this.SenderHighID, this.SenderLowID);
     Packet.AddLogicLong(this.SenderHighID, this.SenderLowID); // HomeID
     Packet.AddString(this.SenderName);
     Packet.AddVInt(this.SenderExpLevel);
     Packet.AddVInt((int)this.SenderRole);
     Packet.AddVInt(this.AgeSeconds);
 }
예제 #3
0
        /// <summary>
        /// Encodes this instance.
        /// </summary>
        internal void Encode(ByteStream Packet, bool Attack = false)
        {
            Packet.AddLogicLong(this._HighID, this._LowID); // Avatar
            Packet.AddLogicLong(this._HighID, this._LowID); // Account
            Packet.AddLogicLong(this._HighID, this._LowID); // Home

            Packet.AddString(this.Name);

            if (!Attack)
            {
                Packet.AddVInt(this.NameChangeState);
            }

            Packet.EncodeLogicData(CSV.Tables.Get(Gamefile.Arena).Datas[1], 54); // DEBUG
            Packet.AddVInt(this._Score);
            Packet.AddVInt(0);
            Packet.AddVInt(0);

            if (!Attack)
            {
                Packet.AddVInt(0);
            }

            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.EncodeLogicData(CSV.Tables.Get(Gamefile.Arena).Datas[1], 54); // DEBUG
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.AddVInt(0);
            Packet.EncodeLogicData(CSV.Tables.Get(Gamefile.Arena).Datas[1], 54); // DEBUG

            this.CommoditySlots.Encode(Packet);

            if (Attack)
            {
                Packet.AddVInt(this._ExpLevel);
            }
            else
            {
                Packet.AddVInt(this._Diamonds);
                Packet.AddVInt(this._FreeDiamonds);
                Packet.AddVInt(this._ExpPoints);
                Packet.AddVInt(this._ExpLevel);
                Packet.AddVInt(0);

                Packet.AddBoolean(this._NameSetByUser);
                Packet.AddBoolean(false); // ?
            }

            Packet.AddBoolean(false); // ?

            if (this._AllianceLowID > 0)
            {
                Packet.AddBoolean(true);

                Packet.AddLogicLong(this._AllianceHighID, this._AllianceLowID);
                Packet.AddString(this._AllianceName);
                Packet.EncodeLogicData(this.AllianceBadgeData, 16);

                if (!Attack)
                {
                    Packet.AddVInt(this._AllianceRole);
                }
            }
            else
            {
                Packet.AddBoolean(false);
            }

            Packet.AddRange("16-00-00-00-16-6A-06-00-00".HexaToBytes());

            Packet.AddBoolean(false);
            Packet.AddVInt(1);
            Packet.AddBoolean(false);
        }