public override void Deserialize(BigEndianReader reader) { base.Deserialize(reader); byte b= reader.ReadByte(); this.showExperience = BooleanByteWrapper.GetFlag(b,0); this.showExperienceLevelFloor = BooleanByteWrapper.GetFlag(b, 1); this.showExperienceNextLevelFloor = BooleanByteWrapper.GetFlag(b, 2); this.showExperienceFightDelta = BooleanByteWrapper.GetFlag(b, 3); this.showExperienceForGuild = BooleanByteWrapper.GetFlag(b, 4); this.showExperienceForMount = BooleanByteWrapper.GetFlag(b, 5); this.isIncarnationExperience = BooleanByteWrapper.GetFlag(b, 6); experience = reader.ReadVarUhLong(); if (experience < 0 || experience > 9.007199254740992E15) throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0 || experience > 9.007199254740992E15"); experienceLevelFloor = reader.ReadVarUhLong(); if (experienceLevelFloor < 0 || experienceLevelFloor > 9.007199254740992E15) throw new Exception("Forbidden value on experienceLevelFloor = " + experienceLevelFloor + ", it doesn't respect the following condition : experienceLevelFloor < 0 || experienceLevelFloor > 9.007199254740992E15"); experienceNextLevelFloor = reader.ReadDouble(); if (experienceNextLevelFloor < 0 || experienceNextLevelFloor > 9.007199254740992E15) throw new Exception("Forbidden value on experienceNextLevelFloor = " + experienceNextLevelFloor + ", it doesn't respect the following condition : experienceNextLevelFloor < 0 || experienceNextLevelFloor > 9.007199254740992E15"); experienceFightDelta = reader.ReadVarInt(); experienceForGuild = reader.ReadVarInt(); if (experienceForGuild < 0) throw new Exception("Forbidden value on experienceForGuild = " + experienceForGuild + ", it doesn't respect the following condition : experienceForGuild < 0"); experienceForMount = reader.ReadVarInt(); if (experienceForMount < 0) throw new Exception("Forbidden value on experienceForMount = " + experienceForMount + ", it doesn't respect the following condition : experienceForMount < 0"); rerollExperienceMul = reader.ReadSByte(); if (rerollExperienceMul < 0) throw new Exception("Forbidden value on rerollExperienceMul = " + rerollExperienceMul + ", it doesn't respect the following condition : rerollExperienceMul < 0"); }
public override void Deserialize(BigEndianReader reader) { byte flag1 = reader.ReadByte(); enabled = BooleanByteWrapper.GetFlag(flag1, 0); abandonnedPaddock = BooleanByteWrapper.GetFlag(flag1, 1); level = reader.ReadByte(); if (level < 0 || level > 255) throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 0 || level > 255"); expLevelFloor = reader.ReadVarUhLong(); if (expLevelFloor < 0 || expLevelFloor > 9.007199254740992E15) throw new Exception("Forbidden value on expLevelFloor = " + expLevelFloor + ", it doesn't respect the following condition : expLevelFloor < 0 || expLevelFloor > 9.007199254740992E15"); experience = reader.ReadVarUhLong(); if (experience < 0 || experience > 9.007199254740992E15) throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0 || experience > 9.007199254740992E15"); expNextLevelFloor = reader.ReadVarUhLong(); if (expNextLevelFloor < 0 || expNextLevelFloor > 9.007199254740992E15) throw new Exception("Forbidden value on expNextLevelFloor = " + expNextLevelFloor + ", it doesn't respect the following condition : expNextLevelFloor < 0 || expNextLevelFloor > 9.007199254740992E15"); creationDate = reader.ReadInt(); if (creationDate < 0) throw new Exception("Forbidden value on creationDate = " + creationDate + ", it doesn't respect the following condition : creationDate < 0"); nbTotalMembers = reader.ReadVarShort(); if (nbTotalMembers < 0) throw new Exception("Forbidden value on nbTotalMembers = " + nbTotalMembers + ", it doesn't respect the following condition : nbTotalMembers < 0"); nbConnectedMembers = reader.ReadVarShort(); if (nbConnectedMembers < 0) throw new Exception("Forbidden value on nbConnectedMembers = " + nbConnectedMembers + ", it doesn't respect the following condition : nbConnectedMembers < 0"); }
public override void Deserialize(BigEndianReader reader) { base.Deserialize(reader); breed = reader.ReadSByte(); sex = reader.ReadBoolean(); rank = reader.ReadVarShort(); if (rank < 0) throw new Exception("Forbidden value on rank = " + rank + ", it doesn't respect the following condition : rank < 0"); givenExperience = reader.ReadVarUhLong(); if (givenExperience < 0 || givenExperience > 9.007199254740992E15) throw new Exception("Forbidden value on givenExperience = " + givenExperience + ", it doesn't respect the following condition : givenExperience < 0 || givenExperience > 9.007199254740992E15"); experienceGivenPercent = reader.ReadSByte(); if (experienceGivenPercent < 0 || experienceGivenPercent > 100) throw new Exception("Forbidden value on experienceGivenPercent = " + experienceGivenPercent + ", it doesn't respect the following condition : experienceGivenPercent < 0 || experienceGivenPercent > 100"); rights = reader.ReadVarInt(); if (rights < 0) throw new Exception("Forbidden value on rights = " + rights + ", it doesn't respect the following condition : rights < 0"); connected = reader.ReadSByte(); if (connected < 0) throw new Exception("Forbidden value on connected = " + connected + ", it doesn't respect the following condition : connected < 0"); alignmentSide = reader.ReadSByte(); hoursSinceLastConnection = reader.ReadUShort(); if (hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535) throw new Exception("Forbidden value on hoursSinceLastConnection = " + hoursSinceLastConnection + ", it doesn't respect the following condition : hoursSinceLastConnection < 0 || hoursSinceLastConnection > 65535"); moodSmileyId = reader.ReadSByte(); accountId = reader.ReadInt(); if (accountId < 0) throw new Exception("Forbidden value on accountId = " + accountId + ", it doesn't respect the following condition : accountId < 0"); achievementPoints = reader.ReadInt(); status = (PlayerStatus)Types.ProtocolTypeManager.GetInstance<Types.PlayerStatus>(reader.ReadShort()); status.Deserialize(reader); }
public virtual void Deserialize(BigEndianReader reader) { jobId = reader.ReadSByte(); if (jobId < 0) throw new Exception("Forbidden value on jobId = " + jobId + ", it doesn't respect the following condition : jobId < 0"); jobLevel = reader.ReadSByte(); if (jobLevel < 0) throw new Exception("Forbidden value on jobLevel = " + jobLevel + ", it doesn't respect the following condition : jobLevel < 0"); jobXP = reader.ReadVarUhLong(); if (jobXP < 0 || jobXP > 9.007199254740992E15) throw new Exception("Forbidden value on jobXP = " + jobXP + ", it doesn't respect the following condition : jobXP < 0 || jobXP > 9.007199254740992E15"); jobXpLevelFloor = reader.ReadVarUhLong(); if (jobXpLevelFloor < 0 || jobXpLevelFloor > 9.007199254740992E15) throw new Exception("Forbidden value on jobXpLevelFloor = " + jobXpLevelFloor + ", it doesn't respect the following condition : jobXpLevelFloor < 0 || jobXpLevelFloor > 9.007199254740992E15"); jobXpNextLevelFloor = reader.ReadVarUhLong(); if (jobXpNextLevelFloor < 0 || jobXpNextLevelFloor > 9.007199254740992E15) throw new Exception("Forbidden value on jobXpNextLevelFloor = " + jobXpNextLevelFloor + ", it doesn't respect the following condition : jobXpNextLevelFloor < 0 || jobXpNextLevelFloor > 9.007199254740992E15"); }
public override void Deserialize(BigEndianReader reader) { mountUid = reader.ReadVarUhLong(); if (mountUid < 0 || mountUid > 9.007199254740992E15) throw new Exception("Forbidden value on mountUid = " + mountUid + ", it doesn't respect the following condition : mountUid < 0 || mountUid > 9.007199254740992E15"); mountLocation = reader.ReadSByte(); mountFoodUid = reader.ReadVarInt(); if (mountFoodUid < 0) throw new Exception("Forbidden value on mountFoodUid = " + mountFoodUid + ", it doesn't respect the following condition : mountFoodUid < 0"); quantity = reader.ReadVarInt(); if (quantity < 0) throw new Exception("Forbidden value on quantity = " + quantity + ", it doesn't respect the following condition : quantity < 0"); }
public virtual void Deserialize(BigEndianReader reader) { byte b = reader.ReadByte(); this.sex = BooleanByteWrapper.GetFlag(b,0); this.isRideable = BooleanByteWrapper.GetFlag(b,1); this.isWild = BooleanByteWrapper.GetFlag(b,2); this.isFecondationReady = BooleanByteWrapper.GetFlag(b,3); id = reader.ReadDouble(); if (id < -9.007199254740992E15 || id > 9.007199254740992E15) throw new Exception("Forbidden value on id = " + id + ", it doesn't respect the following condition : id < -9.007199254740992E15 || id > 9.007199254740992E15"); model = reader.ReadVarInt(); if (model < 0) throw new Exception("Forbidden value on model = " + model + ", it doesn't respect the following condition : model < 0"); var limit = reader.ReadUShort(); ancestor = new int[limit]; for (int i = 0; i < limit; i++) { ancestor[i] = reader.ReadInt(); } limit = reader.ReadUShort(); behaviors = new int[limit]; for (int i = 0; i < limit; i++) { behaviors[i] = reader.ReadInt(); } name = reader.ReadUTF(); ownerId = reader.ReadInt(); if (ownerId < 0) throw new Exception("Forbidden value on ownerId = " + ownerId + ", it doesn't respect the following condition : ownerId < 0"); experience = reader.ReadVarUhLong(); if (experience < 0 || experience > 9.007199254740992E15) throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0 || experience > 9.007199254740992E15"); experienceForLevel = reader.ReadVarUhLong(); if (experienceForLevel < 0 || experienceForLevel > 9.007199254740992E15) throw new Exception("Forbidden value on experienceForLevel = " + experienceForLevel + ", it doesn't respect the following condition : experienceForLevel < 0 || experienceForLevel > 9.007199254740992E15"); experienceForNextLevel = reader.ReadDouble(); if (experienceForNextLevel < -9.007199254740992E15 || experienceForNextLevel > 9.007199254740992E15) throw new Exception("Forbidden value on experienceForNextLevel = " + experienceForNextLevel + ", it doesn't respect the following condition : experienceForNextLevel < -9.007199254740992E15 || experienceForNextLevel > 9.007199254740992E15"); level = reader.ReadSByte(); if (level < 0) throw new Exception("Forbidden value on level = " + level + ", it doesn't respect the following condition : level < 0"); maxPods = reader.ReadVarInt(); if (maxPods < 0) throw new Exception("Forbidden value on maxPods = " + maxPods + ", it doesn't respect the following condition : maxPods < 0"); stamina = reader.ReadVarInt(); if (stamina < 0) throw new Exception("Forbidden value on stamina = " + stamina + ", it doesn't respect the following condition : stamina < 0"); staminaMax = reader.ReadVarInt(); if (staminaMax < 0) throw new Exception("Forbidden value on staminaMax = " + staminaMax + ", it doesn't respect the following condition : staminaMax < 0"); maturity = reader.ReadVarInt(); if (maturity < 0) throw new Exception("Forbidden value on maturity = " + maturity + ", it doesn't respect the following condition : maturity < 0"); maturityForAdult = reader.ReadVarInt(); if (maturityForAdult < 0) throw new Exception("Forbidden value on maturityForAdult = " + maturityForAdult + ", it doesn't respect the following condition : maturityForAdult < 0"); energy = reader.ReadVarInt(); if (energy < 0) throw new Exception("Forbidden value on energy = " + energy + ", it doesn't respect the following condition : energy < 0"); energyMax = reader.ReadVarInt(); if (energyMax < 0) throw new Exception("Forbidden value on energyMax = " + energyMax + ", it doesn't respect the following condition : energyMax < 0"); serenity = reader.ReadInt(); aggressivityMax = reader.ReadInt(); serenityMax = reader.ReadVarInt(); if (serenityMax < 0) throw new Exception("Forbidden value on serenityMax = " + serenityMax + ", it doesn't respect the following condition : serenityMax < 0"); love = reader.ReadVarInt(); if (love < 0) throw new Exception("Forbidden value on love = " + love + ", it doesn't respect the following condition : love < 0"); loveMax = reader.ReadVarInt(); if (loveMax < 0) throw new Exception("Forbidden value on loveMax = " + loveMax + ", it doesn't respect the following condition : loveMax < 0"); fecondationTime = reader.ReadInt(); boostLimiter = reader.ReadInt(); if (boostLimiter < 0) throw new Exception("Forbidden value on boostLimiter = " + boostLimiter + ", it doesn't respect the following condition : boostLimiter < 0"); boostMax = reader.ReadDouble(); if (boostMax < -9.007199254740992E15 || boostMax > 9.007199254740992E15) throw new Exception("Forbidden value on boostMax = " + boostMax + ", it doesn't respect the following condition : boostMax < -9.007199254740992E15 || boostMax > 9.007199254740992E15"); reproductionCount = reader.ReadInt(); reproductionCountMax = reader.ReadVarInt(); if (reproductionCountMax < 0) throw new Exception("Forbidden value on reproductionCountMax = " + reproductionCountMax + ", it doesn't respect the following condition : reproductionCountMax < 0"); limit = reader.ReadUShort(); effectList = new Types.ObjectEffectInteger[limit]; for (int i = 0; i < limit; i++) { effectList[i] = new Types.ObjectEffectInteger(); effectList[i].Deserialize(reader); } }
public override void Deserialize(BigEndianReader reader) { base.Deserialize(reader); maxPods = reader.ReadVarShort(); if (maxPods < 0) throw new Exception("Forbidden value on maxPods = " + maxPods + ", it doesn't respect the following condition : maxPods < 0"); prospecting = reader.ReadVarShort(); if (prospecting < 0) throw new Exception("Forbidden value on prospecting = " + prospecting + ", it doesn't respect the following condition : prospecting < 0"); wisdom = reader.ReadVarShort(); if (wisdom < 0) throw new Exception("Forbidden value on wisdom = " + wisdom + ", it doesn't respect the following condition : wisdom < 0"); taxCollectorsCount = reader.ReadSByte(); if (taxCollectorsCount < 0) throw new Exception("Forbidden value on taxCollectorsCount = " + taxCollectorsCount + ", it doesn't respect the following condition : taxCollectorsCount < 0"); taxCollectorAttack = reader.ReadInt(); kamas = reader.ReadVarInt(); if (kamas < 0) throw new Exception("Forbidden value on kamas = " + kamas + ", it doesn't respect the following condition : kamas < 0"); experience = reader.ReadVarUhLong(); if (experience < 0 || experience > 9.007199254740992E15) throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0 || experience > 9.007199254740992E15"); pods = reader.ReadVarInt(); if (pods < 0) throw new Exception("Forbidden value on pods = " + pods + ", it doesn't respect the following condition : pods < 0"); itemsValue = reader.ReadVarInt(); if (itemsValue < 0) throw new Exception("Forbidden value on itemsValue = " + itemsValue + ", it doesn't respect the following condition : itemsValue < 0"); }
public virtual void Deserialize(BigEndianReader reader) { experience = reader.ReadVarUhLong(); if (experience < 0 || experience > 9.007199254740992E15) throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0 || experience > 9.007199254740992E15"); experienceLevelFloor = reader.ReadVarUhLong(); if (experienceLevelFloor < 0 || experienceLevelFloor > 9.007199254740992E15) throw new Exception("Forbidden value on experienceLevelFloor = " + experienceLevelFloor + ", it doesn't respect the following condition : experienceLevelFloor < 0 || experienceLevelFloor > 9.007199254740992E15"); experienceNextLevelFloor = reader.ReadVarUhLong(); if (experienceNextLevelFloor < 0 || experienceNextLevelFloor > 9.007199254740992E15) throw new Exception("Forbidden value on experienceNextLevelFloor = " + experienceNextLevelFloor + ", it doesn't respect the following condition : experienceNextLevelFloor < 0 || experienceNextLevelFloor > 9.007199254740992E15"); kamas = reader.ReadInt(); if (kamas < 0) throw new Exception("Forbidden value on kamas = " + kamas + ", it doesn't respect the following condition : kamas < 0"); statsPoints = reader.ReadVarShort(); if (statsPoints < 0) throw new Exception("Forbidden value on statsPoints = " + statsPoints + ", it doesn't respect the following condition : statsPoints < 0"); additionnalPoints = reader.ReadVarShort(); if (additionnalPoints < 0) throw new Exception("Forbidden value on additionnalPoints = " + additionnalPoints + ", it doesn't respect the following condition : additionnalPoints < 0"); spellsPoints = reader.ReadVarShort(); if (spellsPoints < 0) throw new Exception("Forbidden value on spellsPoints = " + spellsPoints + ", it doesn't respect the following condition : spellsPoints < 0"); alignmentInfos = new Types.ActorExtendedAlignmentInformations(); alignmentInfos.Deserialize(reader); lifePoints = reader.ReadVarInt(); if (lifePoints < 0) throw new Exception("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0"); maxLifePoints = reader.ReadVarInt(); if (maxLifePoints < 0) throw new Exception("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0"); energyPoints = reader.ReadVarShort(); if (energyPoints < 0) throw new Exception("Forbidden value on energyPoints = " + energyPoints + ", it doesn't respect the following condition : energyPoints < 0"); maxEnergyPoints = reader.ReadVarShort(); if (maxEnergyPoints < 0) throw new Exception("Forbidden value on maxEnergyPoints = " + maxEnergyPoints + ", it doesn't respect the following condition : maxEnergyPoints < 0"); actionPointsCurrent = reader.ReadVarShort(); movementPointsCurrent = reader.ReadVarShort(); initiative = new Types.CharacterBaseCharacteristic(); initiative.Deserialize(reader); prospecting = new Types.CharacterBaseCharacteristic(); prospecting.Deserialize(reader); actionPoints = new Types.CharacterBaseCharacteristic(); actionPoints.Deserialize(reader); movementPoints = new Types.CharacterBaseCharacteristic(); movementPoints.Deserialize(reader); strength = new Types.CharacterBaseCharacteristic(); strength.Deserialize(reader); vitality = new Types.CharacterBaseCharacteristic(); vitality.Deserialize(reader); wisdom = new Types.CharacterBaseCharacteristic(); wisdom.Deserialize(reader); chance = new Types.CharacterBaseCharacteristic(); chance.Deserialize(reader); agility = new Types.CharacterBaseCharacteristic(); agility.Deserialize(reader); intelligence = new Types.CharacterBaseCharacteristic(); intelligence.Deserialize(reader); range = new Types.CharacterBaseCharacteristic(); range.Deserialize(reader); summonableCreaturesBoost = new Types.CharacterBaseCharacteristic(); summonableCreaturesBoost.Deserialize(reader); reflect = new Types.CharacterBaseCharacteristic(); reflect.Deserialize(reader); criticalHit = new Types.CharacterBaseCharacteristic(); criticalHit.Deserialize(reader); criticalHitWeapon = reader.ReadVarShort(); if (criticalHitWeapon < 0) throw new Exception("Forbidden value on criticalHitWeapon = " + criticalHitWeapon + ", it doesn't respect the following condition : criticalHitWeapon < 0"); criticalMiss = new Types.CharacterBaseCharacteristic(); criticalMiss.Deserialize(reader); healBonus = new Types.CharacterBaseCharacteristic(); healBonus.Deserialize(reader); allDamagesBonus = new Types.CharacterBaseCharacteristic(); allDamagesBonus.Deserialize(reader); weaponDamagesBonusPercent = new Types.CharacterBaseCharacteristic(); weaponDamagesBonusPercent.Deserialize(reader); damagesBonusPercent = new Types.CharacterBaseCharacteristic(); damagesBonusPercent.Deserialize(reader); trapBonus = new Types.CharacterBaseCharacteristic(); trapBonus.Deserialize(reader); trapBonusPercent = new Types.CharacterBaseCharacteristic(); trapBonusPercent.Deserialize(reader); glyphBonusPercent = new Types.CharacterBaseCharacteristic(); glyphBonusPercent.Deserialize(reader); permanentDamagePercent = new Types.CharacterBaseCharacteristic(); permanentDamagePercent.Deserialize(reader); tackleBlock = new Types.CharacterBaseCharacteristic(); tackleBlock.Deserialize(reader); tackleEvade = new Types.CharacterBaseCharacteristic(); tackleEvade.Deserialize(reader); PAAttack = new Types.CharacterBaseCharacteristic(); PAAttack.Deserialize(reader); PMAttack = new Types.CharacterBaseCharacteristic(); PMAttack.Deserialize(reader); pushDamageBonus = new Types.CharacterBaseCharacteristic(); pushDamageBonus.Deserialize(reader); criticalDamageBonus = new Types.CharacterBaseCharacteristic(); criticalDamageBonus.Deserialize(reader); neutralDamageBonus = new Types.CharacterBaseCharacteristic(); neutralDamageBonus.Deserialize(reader); earthDamageBonus = new Types.CharacterBaseCharacteristic(); earthDamageBonus.Deserialize(reader); waterDamageBonus = new Types.CharacterBaseCharacteristic(); waterDamageBonus.Deserialize(reader); airDamageBonus = new Types.CharacterBaseCharacteristic(); airDamageBonus.Deserialize(reader); fireDamageBonus = new Types.CharacterBaseCharacteristic(); fireDamageBonus.Deserialize(reader); dodgePALostProbability = new Types.CharacterBaseCharacteristic(); dodgePALostProbability.Deserialize(reader); dodgePMLostProbability = new Types.CharacterBaseCharacteristic(); dodgePMLostProbability.Deserialize(reader); neutralElementResistPercent = new Types.CharacterBaseCharacteristic(); neutralElementResistPercent.Deserialize(reader); earthElementResistPercent = new Types.CharacterBaseCharacteristic(); earthElementResistPercent.Deserialize(reader); waterElementResistPercent = new Types.CharacterBaseCharacteristic(); waterElementResistPercent.Deserialize(reader); airElementResistPercent = new Types.CharacterBaseCharacteristic(); airElementResistPercent.Deserialize(reader); fireElementResistPercent = new Types.CharacterBaseCharacteristic(); fireElementResistPercent.Deserialize(reader); neutralElementReduction = new Types.CharacterBaseCharacteristic(); neutralElementReduction.Deserialize(reader); earthElementReduction = new Types.CharacterBaseCharacteristic(); earthElementReduction.Deserialize(reader); waterElementReduction = new Types.CharacterBaseCharacteristic(); waterElementReduction.Deserialize(reader); airElementReduction = new Types.CharacterBaseCharacteristic(); airElementReduction.Deserialize(reader); fireElementReduction = new Types.CharacterBaseCharacteristic(); fireElementReduction.Deserialize(reader); pushDamageReduction = new Types.CharacterBaseCharacteristic(); pushDamageReduction.Deserialize(reader); criticalDamageReduction = new Types.CharacterBaseCharacteristic(); criticalDamageReduction.Deserialize(reader); pvpNeutralElementResistPercent = new Types.CharacterBaseCharacteristic(); pvpNeutralElementResistPercent.Deserialize(reader); pvpEarthElementResistPercent = new Types.CharacterBaseCharacteristic(); pvpEarthElementResistPercent.Deserialize(reader); pvpWaterElementResistPercent = new Types.CharacterBaseCharacteristic(); pvpWaterElementResistPercent.Deserialize(reader); pvpAirElementResistPercent = new Types.CharacterBaseCharacteristic(); pvpAirElementResistPercent.Deserialize(reader); pvpFireElementResistPercent = new Types.CharacterBaseCharacteristic(); pvpFireElementResistPercent.Deserialize(reader); pvpNeutralElementReduction = new Types.CharacterBaseCharacteristic(); pvpNeutralElementReduction.Deserialize(reader); pvpEarthElementReduction = new Types.CharacterBaseCharacteristic(); pvpEarthElementReduction.Deserialize(reader); pvpWaterElementReduction = new Types.CharacterBaseCharacteristic(); pvpWaterElementReduction.Deserialize(reader); pvpAirElementReduction = new Types.CharacterBaseCharacteristic(); pvpAirElementReduction.Deserialize(reader); pvpFireElementReduction = new Types.CharacterBaseCharacteristic(); pvpFireElementReduction.Deserialize(reader); var limit = reader.ReadUShort(); spellModifications = new Types.CharacterSpellModification[limit]; for (int i = 0; i < limit; i++) { spellModifications[i] = new Types.CharacterSpellModification(); spellModifications[i].Deserialize(reader); } probationTime = reader.ReadInt(); if (probationTime < 0) throw new Exception("Forbidden value on probationTime = " + probationTime + ", it doesn't respect the following condition : probationTime < 0"); }