Ejemplo n.º 1
0
        public override void Serialize(IDataWriter writer)
        {
            m_creator.Serialize(writer);
            writer.WriteShort(((short)(m_criterions.Count)));
            int criterionsIndex;

            for (criterionsIndex = 0; (criterionsIndex < m_criterions.Count); criterionsIndex = (criterionsIndex + 1))
            {
                DareCriteria objectToSend = m_criterions[criterionsIndex];
                objectToSend.Serialize(writer);
            }
            writer.WriteDouble(m_dareId);
            writer.WriteVarUhLong(m_subscriptionFee);
            writer.WriteVarUhLong(m_jackpot);
            writer.WriteUShort(m_maxCountWinners);
            writer.WriteDouble(m_endDate);
            writer.WriteBoolean(m_isPrivate);
            writer.WriteVarUhInt(m_guildId);
            writer.WriteVarUhInt(m_allianceId);
            writer.WriteDouble(m_startDate);
        }
Ejemplo n.º 2
0
        public override void Deserialize(IDataReader reader)
        {
            DareId  = reader.ReadDouble();
            Creator = new CharacterBasicMinimalInformations();
            Creator.Deserialize(reader);
            SubscriptionFee = reader.ReadVarUhLong();
            Jackpot         = reader.ReadVarUhLong();
            MaxCountWinners = reader.ReadUShort();
            EndDate         = reader.ReadDouble();
            IsPrivate       = reader.ReadBoolean();
            GuildId         = reader.ReadVarUhInt();
            AllianceId      = reader.ReadVarUhInt();
            var criterionsCount = reader.ReadUShort();

            Criterions = new List <DareCriteria>();
            for (var criterionsIndex = 0; criterionsIndex < criterionsCount; criterionsIndex++)
            {
                var objectToAdd = new DareCriteria();
                objectToAdd.Deserialize(reader);
                Criterions.Add(objectToAdd);
            }
            StartDate = reader.ReadDouble();
        }
Ejemplo n.º 3
0
        public override void Deserialize(IDataReader reader)
        {
            m_creator = new CharacterBasicMinimalInformations();
            m_creator.Deserialize(reader);
            int criterionsCount = reader.ReadUShort();
            int criterionsIndex;

            m_criterions = new System.Collections.Generic.List <DareCriteria>();
            for (criterionsIndex = 0; (criterionsIndex < criterionsCount); criterionsIndex = (criterionsIndex + 1))
            {
                DareCriteria objectToAdd = new DareCriteria();
                objectToAdd.Deserialize(reader);
                m_criterions.Add(objectToAdd);
            }
            m_dareId          = reader.ReadDouble();
            m_subscriptionFee = reader.ReadVarUhLong();
            m_jackpot         = reader.ReadVarUhLong();
            m_maxCountWinners = reader.ReadUShort();
            m_endDate         = reader.ReadDouble();
            m_isPrivate       = reader.ReadBoolean();
            m_guildId         = reader.ReadVarUhInt();
            m_allianceId      = reader.ReadVarUhInt();
            m_startDate       = reader.ReadDouble();
        }