Example #1
0
        public virtual void Deserialize(IDataReader reader)
        {
            dareId = reader.ReadDouble();
            if (dareId < 0 || dareId > 9007199254740990)
            {
                throw new Exception("Forbidden value on dareId = " + dareId + ", it doesn't respect the following condition : dareId < 0 || dareId > 9007199254740990");
            }
            creator = new Types.CharacterBasicMinimalInformations();
            creator.Deserialize(reader);
            subscriptionFee = reader.ReadVarLong();
            if (subscriptionFee < 0 || subscriptionFee > 9007199254740990)
            {
                throw new Exception("Forbidden value on subscriptionFee = " + subscriptionFee + ", it doesn't respect the following condition : subscriptionFee < 0 || subscriptionFee > 9007199254740990");
            }
            jackpot = reader.ReadVarLong();
            if (jackpot < 0 || jackpot > 9007199254740990)
            {
                throw new Exception("Forbidden value on jackpot = " + jackpot + ", it doesn't respect the following condition : jackpot < 0 || jackpot > 9007199254740990");
            }
            maxCountWinners = reader.ReadShort();
            if (maxCountWinners < 0 || maxCountWinners > 65535)
            {
                throw new Exception("Forbidden value on maxCountWinners = " + maxCountWinners + ", it doesn't respect the following condition : maxCountWinners < 0 || maxCountWinners > 65535");
            }
            endDate = reader.ReadDouble();
            if (endDate < 0 || endDate > 9007199254740990)
            {
                throw new Exception("Forbidden value on endDate = " + endDate + ", it doesn't respect the following condition : endDate < 0 || endDate > 9007199254740990");
            }
            isPrivate = reader.ReadBoolean();
            guildId   = reader.ReadVarInt();
            if (guildId < 0)
            {
                throw new Exception("Forbidden value on guildId = " + guildId + ", it doesn't respect the following condition : guildId < 0");
            }
            allianceId = reader.ReadVarInt();
            if (allianceId < 0)
            {
                throw new Exception("Forbidden value on allianceId = " + allianceId + ", it doesn't respect the following condition : allianceId < 0");
            }
            var limit       = reader.ReadShort();
            var criterions_ = new Types.DareCriteria[limit];

            for (int i = 0; i < limit; i++)
            {
                criterions_[i] = new Types.DareCriteria();
                criterions_[i].Deserialize(reader);
            }
            criterions = criterions_;
            startDate  = reader.ReadDouble();
            if (startDate < 0 || startDate > 9007199254740990)
            {
                throw new Exception("Forbidden value on startDate = " + startDate + ", it doesn't respect the following condition : startDate < 0 || startDate > 9007199254740990");
            }
        }
 public DareInformations(double dareId, Types.CharacterBasicMinimalInformations creator, int subscriptionFee, int jackpot, ushort maxCountWinners, double endDate, bool isPrivate, uint guildId, uint allianceId, Types.DareCriteria[] criterions, double startDate)
 {
     this.dareId          = dareId;
     this.creator         = creator;
     this.subscriptionFee = subscriptionFee;
     this.jackpot         = jackpot;
     this.maxCountWinners = maxCountWinners;
     this.endDate         = endDate;
     this.isPrivate       = isPrivate;
     this.guildId         = guildId;
     this.allianceId      = allianceId;
     this.criterions      = criterions;
     this.startDate       = startDate;
 }
Example #3
0
        public virtual void Deserialize(IReader reader)
        {
            dareId  = reader.ReadDouble();
            creator = new Types.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 limit = reader.ReadUShort();

            criterions = new Types.DareCriteria[limit];
            for (int i = 0; i < limit; i++)
            {
                (criterions as Types.DareCriteria[])[i] = new Types.DareCriteria();
                (criterions as Types.DareCriteria[])[i].Deserialize(reader);
            }
            startDate = reader.ReadDouble();
        }
 public override void Deserialize(ICustomDataInput reader)
 {
     leaver = new Types.CharacterBasicMinimalInformations();
     leaver.Deserialize(reader);
 }
 public ArenaFighterLeaveMessage(Types.CharacterBasicMinimalInformations leaver)
 {
     this.leaver = leaver;
 }
 public void Deserialize(IDataReader reader)
 {
     leaver = new Types.CharacterBasicMinimalInformations();
     leaver.Deserialize(reader);
 }