Example #1
0
        public override void Serialize(ICustomDataOutput 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);
        }
Example #2
0
        public override void Deserialize(ICustomDataInput 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();
        }