public override void Deserialize(IDataReader reader) { nbSubOwned = reader.ReadInt(); if (nbSubOwned < 0) { throw new Exception("Forbidden value on nbSubOwned = " + nbSubOwned + ", it doesn't respect the following condition : nbSubOwned < 0"); } subTotal = reader.ReadInt(); if (subTotal < 0) { throw new Exception("Forbidden value on subTotal = " + subTotal + ", it doesn't respect the following condition : subTotal < 0"); } maxSub = reader.ReadInt(); if (maxSub < 0) { throw new Exception("Forbidden value on maxSub = " + maxSub + ", it doesn't respect the following condition : maxSub < 0"); } var limit = reader.ReadUShort(); var subAreasInformation_ = new Types.PrismSubAreaInformation[limit]; for (int i = 0; i < limit; i++) { subAreasInformation_[i] = new Types.PrismSubAreaInformation(); subAreasInformation_[i].Deserialize(reader); } subAreasInformation = subAreasInformation_; nbConqsOwned = reader.ReadInt(); if (nbConqsOwned < 0) { throw new Exception("Forbidden value on nbConqsOwned = " + nbConqsOwned + ", it doesn't respect the following condition : nbConqsOwned < 0"); } conqsTotal = reader.ReadInt(); if (conqsTotal < 0) { throw new Exception("Forbidden value on conqsTotal = " + conqsTotal + ", it doesn't respect the following condition : conqsTotal < 0"); } limit = reader.ReadUShort(); var conquetesInformation_ = new Types.VillageConquestPrismInformation[limit]; for (int i = 0; i < limit; i++) { conquetesInformation_[i] = new Types.VillageConquestPrismInformation(); conquetesInformation_[i].Deserialize(reader); } conquetesInformation = conquetesInformation_; }
public override void Deserialize(IDataReader reader) { nbSubOwned = reader.ReadInt(); if (nbSubOwned < 0) throw new Exception("Forbidden value on nbSubOwned = " + nbSubOwned + ", it doesn't respect the following condition : nbSubOwned < 0"); subTotal = reader.ReadInt(); if (subTotal < 0) throw new Exception("Forbidden value on subTotal = " + subTotal + ", it doesn't respect the following condition : subTotal < 0"); maxSub = reader.ReadInt(); if (maxSub < 0) throw new Exception("Forbidden value on maxSub = " + maxSub + ", it doesn't respect the following condition : maxSub < 0"); var limit = reader.ReadUShort(); subAreasInformation = new Types.PrismSubAreaInformation[limit]; for (int i = 0; i < limit; i++) { subAreasInformation[i] = new Types.PrismSubAreaInformation(); subAreasInformation[i].Deserialize(reader); } nbConqsOwned = reader.ReadInt(); if (nbConqsOwned < 0) throw new Exception("Forbidden value on nbConqsOwned = " + nbConqsOwned + ", it doesn't respect the following condition : nbConqsOwned < 0"); conqsTotal = reader.ReadInt(); if (conqsTotal < 0) throw new Exception("Forbidden value on conqsTotal = " + conqsTotal + ", it doesn't respect the following condition : conqsTotal < 0"); limit = reader.ReadUShort(); conquetesInformation = new Types.VillageConquestPrismInformation[limit]; for (int i = 0; i < limit; i++) { conquetesInformation[i] = new Types.VillageConquestPrismInformation(); conquetesInformation[i].Deserialize(reader); } }