public CharacterSpellModification(sbyte modificationType, ushort spellId,
                                   Types.CharacterBaseCharacteristic value)
 {
     this.modificationType = modificationType;
     this.spellId          = spellId;
     this.value            = value;
 }
Beispiel #2
0
 public virtual void Deserialize(IReader reader)
 {
     modificationType = reader.ReadSByte();
     spellId          = reader.ReadVarUhShort();
     value            = new Types.CharacterBaseCharacteristic();
     value.Deserialize(reader);
 }
Beispiel #3
0
 public virtual void Deserialize(IDataReader reader)
 {
     modificationType = reader.ReadSByte();
     spellId          = reader.ReadVarShort();
     if (spellId < 0)
     {
         throw new Exception("Forbidden value on spellId = " + spellId + ", it doesn't respect the following condition : spellId < 0");
     }
     value = new Types.CharacterBaseCharacteristic();
     value.Deserialize(reader);
 }
 public virtual void Deserialize(IDataReader reader)
 {
     modificationType = reader.ReadSByte();
     if (modificationType < 0)
         throw new Exception("Forbidden value on modificationType = " + modificationType + ", it doesn't respect the following condition : modificationType < 0");
     spellId = reader.ReadShort();
     if (spellId < 0)
         throw new Exception("Forbidden value on spellId = " + spellId + ", it doesn't respect the following condition : spellId < 0");
     value = new Types.CharacterBaseCharacteristic();
     value.Deserialize(reader);
 }
 public virtual void Deserialize(IDataReader reader)
 {
     experience = reader.ReadDouble();
     if (experience < 0)
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0");
     experienceLevelFloor = reader.ReadDouble();
     if (experienceLevelFloor < 0)
         throw new Exception("Forbidden value on experienceLevelFloor = " + experienceLevelFloor + ", it doesn't respect the following condition : experienceLevelFloor < 0");
     experienceNextLevelFloor = reader.ReadDouble();
     if (experienceNextLevelFloor < 0)
         throw new Exception("Forbidden value on experienceNextLevelFloor = " + experienceNextLevelFloor + ", it doesn't respect the following condition : experienceNextLevelFloor < 0");
     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.ReadInt();
     if (statsPoints < 0)
         throw new Exception("Forbidden value on statsPoints = " + statsPoints + ", it doesn't respect the following condition : statsPoints < 0");
     spellsPoints = reader.ReadInt();
     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.ReadInt();
     if (lifePoints < 0)
         throw new Exception("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0");
     maxLifePoints = reader.ReadInt();
     if (maxLifePoints < 0)
         throw new Exception("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0");
     energyPoints = reader.ReadShort();
     if (energyPoints < 0)
         throw new Exception("Forbidden value on energyPoints = " + energyPoints + ", it doesn't respect the following condition : energyPoints < 0");
     maxEnergyPoints = reader.ReadShort();
     if (maxEnergyPoints < 0)
         throw new Exception("Forbidden value on maxEnergyPoints = " + maxEnergyPoints + ", it doesn't respect the following condition : maxEnergyPoints < 0");
     actionPointsCurrent = reader.ReadShort();
     movementPointsCurrent = reader.ReadShort();
     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.ReadShort();
     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);
     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);
     }
 }
 public CharacterCharacteristicsInformations(double experience, double experienceLevelFloor, double experienceNextLevelFloor, int kamas, int statsPoints, int spellsPoints, Types.ActorExtendedAlignmentInformations alignmentInfos, int lifePoints, int maxLifePoints, short energyPoints, short maxEnergyPoints, short actionPointsCurrent, short movementPointsCurrent, Types.CharacterBaseCharacteristic initiative, Types.CharacterBaseCharacteristic prospecting, Types.CharacterBaseCharacteristic actionPoints, Types.CharacterBaseCharacteristic movementPoints, Types.CharacterBaseCharacteristic strength, Types.CharacterBaseCharacteristic vitality, Types.CharacterBaseCharacteristic wisdom, Types.CharacterBaseCharacteristic chance, Types.CharacterBaseCharacteristic agility, Types.CharacterBaseCharacteristic intelligence, Types.CharacterBaseCharacteristic range, Types.CharacterBaseCharacteristic summonableCreaturesBoost, Types.CharacterBaseCharacteristic reflect, Types.CharacterBaseCharacteristic criticalHit, short criticalHitWeapon, Types.CharacterBaseCharacteristic criticalMiss, Types.CharacterBaseCharacteristic healBonus, Types.CharacterBaseCharacteristic allDamagesBonus, Types.CharacterBaseCharacteristic weaponDamagesBonusPercent, Types.CharacterBaseCharacteristic damagesBonusPercent, Types.CharacterBaseCharacteristic trapBonus, Types.CharacterBaseCharacteristic trapBonusPercent, Types.CharacterBaseCharacteristic permanentDamagePercent, Types.CharacterBaseCharacteristic tackleBlock, Types.CharacterBaseCharacteristic tackleEvade, Types.CharacterBaseCharacteristic PAAttack, Types.CharacterBaseCharacteristic PMAttack, Types.CharacterBaseCharacteristic pushDamageBonus, Types.CharacterBaseCharacteristic criticalDamageBonus, Types.CharacterBaseCharacteristic neutralDamageBonus, Types.CharacterBaseCharacteristic earthDamageBonus, Types.CharacterBaseCharacteristic waterDamageBonus, Types.CharacterBaseCharacteristic airDamageBonus, Types.CharacterBaseCharacteristic fireDamageBonus, Types.CharacterBaseCharacteristic dodgePALostProbability, Types.CharacterBaseCharacteristic dodgePMLostProbability, Types.CharacterBaseCharacteristic neutralElementResistPercent, Types.CharacterBaseCharacteristic earthElementResistPercent, Types.CharacterBaseCharacteristic waterElementResistPercent, Types.CharacterBaseCharacteristic airElementResistPercent, Types.CharacterBaseCharacteristic fireElementResistPercent, Types.CharacterBaseCharacteristic neutralElementReduction, Types.CharacterBaseCharacteristic earthElementReduction, Types.CharacterBaseCharacteristic waterElementReduction, Types.CharacterBaseCharacteristic airElementReduction, Types.CharacterBaseCharacteristic fireElementReduction, Types.CharacterBaseCharacteristic pushDamageReduction, Types.CharacterBaseCharacteristic criticalDamageReduction, Types.CharacterBaseCharacteristic pvpNeutralElementResistPercent, Types.CharacterBaseCharacteristic pvpEarthElementResistPercent, Types.CharacterBaseCharacteristic pvpWaterElementResistPercent, Types.CharacterBaseCharacteristic pvpAirElementResistPercent, Types.CharacterBaseCharacteristic pvpFireElementResistPercent, Types.CharacterBaseCharacteristic pvpNeutralElementReduction, Types.CharacterBaseCharacteristic pvpEarthElementReduction, Types.CharacterBaseCharacteristic pvpWaterElementReduction, Types.CharacterBaseCharacteristic pvpAirElementReduction, Types.CharacterBaseCharacteristic pvpFireElementReduction, Types.CharacterSpellModification[] spellModifications)
 {
     this.experience = experience;
     this.experienceLevelFloor = experienceLevelFloor;
     this.experienceNextLevelFloor = experienceNextLevelFloor;
     this.kamas = kamas;
     this.statsPoints = statsPoints;
     this.spellsPoints = spellsPoints;
     this.alignmentInfos = alignmentInfos;
     this.lifePoints = lifePoints;
     this.maxLifePoints = maxLifePoints;
     this.energyPoints = energyPoints;
     this.maxEnergyPoints = maxEnergyPoints;
     this.actionPointsCurrent = actionPointsCurrent;
     this.movementPointsCurrent = movementPointsCurrent;
     this.initiative = initiative;
     this.prospecting = prospecting;
     this.actionPoints = actionPoints;
     this.movementPoints = movementPoints;
     this.strength = strength;
     this.vitality = vitality;
     this.wisdom = wisdom;
     this.chance = chance;
     this.agility = agility;
     this.intelligence = intelligence;
     this.range = range;
     this.summonableCreaturesBoost = summonableCreaturesBoost;
     this.reflect = reflect;
     this.criticalHit = criticalHit;
     this.criticalHitWeapon = criticalHitWeapon;
     this.criticalMiss = criticalMiss;
     this.healBonus = healBonus;
     this.allDamagesBonus = allDamagesBonus;
     this.weaponDamagesBonusPercent = weaponDamagesBonusPercent;
     this.damagesBonusPercent = damagesBonusPercent;
     this.trapBonus = trapBonus;
     this.trapBonusPercent = trapBonusPercent;
     this.permanentDamagePercent = permanentDamagePercent;
     this.tackleBlock = tackleBlock;
     this.tackleEvade = tackleEvade;
     this.PAAttack = PAAttack;
     this.PMAttack = PMAttack;
     this.pushDamageBonus = pushDamageBonus;
     this.criticalDamageBonus = criticalDamageBonus;
     this.neutralDamageBonus = neutralDamageBonus;
     this.earthDamageBonus = earthDamageBonus;
     this.waterDamageBonus = waterDamageBonus;
     this.airDamageBonus = airDamageBonus;
     this.fireDamageBonus = fireDamageBonus;
     this.dodgePALostProbability = dodgePALostProbability;
     this.dodgePMLostProbability = dodgePMLostProbability;
     this.neutralElementResistPercent = neutralElementResistPercent;
     this.earthElementResistPercent = earthElementResistPercent;
     this.waterElementResistPercent = waterElementResistPercent;
     this.airElementResistPercent = airElementResistPercent;
     this.fireElementResistPercent = fireElementResistPercent;
     this.neutralElementReduction = neutralElementReduction;
     this.earthElementReduction = earthElementReduction;
     this.waterElementReduction = waterElementReduction;
     this.airElementReduction = airElementReduction;
     this.fireElementReduction = fireElementReduction;
     this.pushDamageReduction = pushDamageReduction;
     this.criticalDamageReduction = criticalDamageReduction;
     this.pvpNeutralElementResistPercent = pvpNeutralElementResistPercent;
     this.pvpEarthElementResistPercent = pvpEarthElementResistPercent;
     this.pvpWaterElementResistPercent = pvpWaterElementResistPercent;
     this.pvpAirElementResistPercent = pvpAirElementResistPercent;
     this.pvpFireElementResistPercent = pvpFireElementResistPercent;
     this.pvpNeutralElementReduction = pvpNeutralElementReduction;
     this.pvpEarthElementReduction = pvpEarthElementReduction;
     this.pvpWaterElementReduction = pvpWaterElementReduction;
     this.pvpAirElementReduction = pvpAirElementReduction;
     this.pvpFireElementReduction = pvpFireElementReduction;
     this.spellModifications = spellModifications;
 }
 public CharacterCharacteristicsInformations(double experience, double experienceLevelFloor, double experienceNextLevelFloor, int kamas, int statsPoints, int spellsPoints, Types.ActorExtendedAlignmentInformations alignmentInfos, int lifePoints, int maxLifePoints, short energyPoints, short maxEnergyPoints, short actionPointsCurrent, short movementPointsCurrent, Types.CharacterBaseCharacteristic initiative, Types.CharacterBaseCharacteristic prospecting, Types.CharacterBaseCharacteristic actionPoints, Types.CharacterBaseCharacteristic movementPoints, Types.CharacterBaseCharacteristic strength, Types.CharacterBaseCharacteristic vitality, Types.CharacterBaseCharacteristic wisdom, Types.CharacterBaseCharacteristic chance, Types.CharacterBaseCharacteristic agility, Types.CharacterBaseCharacteristic intelligence, Types.CharacterBaseCharacteristic range, Types.CharacterBaseCharacteristic summonableCreaturesBoost, Types.CharacterBaseCharacteristic reflect, Types.CharacterBaseCharacteristic criticalHit, short criticalHitWeapon, Types.CharacterBaseCharacteristic criticalMiss, Types.CharacterBaseCharacteristic healBonus, Types.CharacterBaseCharacteristic allDamagesBonus, Types.CharacterBaseCharacteristic weaponDamagesBonusPercent, Types.CharacterBaseCharacteristic damagesBonusPercent, Types.CharacterBaseCharacteristic trapBonus, Types.CharacterBaseCharacteristic trapBonusPercent, Types.CharacterBaseCharacteristic permanentDamagePercent, Types.CharacterBaseCharacteristic tackleBlock, Types.CharacterBaseCharacteristic tackleEvade, Types.CharacterBaseCharacteristic PAAttack, Types.CharacterBaseCharacteristic PMAttack, Types.CharacterBaseCharacteristic pushDamageBonus, Types.CharacterBaseCharacteristic criticalDamageBonus, Types.CharacterBaseCharacteristic neutralDamageBonus, Types.CharacterBaseCharacteristic earthDamageBonus, Types.CharacterBaseCharacteristic waterDamageBonus, Types.CharacterBaseCharacteristic airDamageBonus, Types.CharacterBaseCharacteristic fireDamageBonus, Types.CharacterBaseCharacteristic dodgePALostProbability, Types.CharacterBaseCharacteristic dodgePMLostProbability, Types.CharacterBaseCharacteristic neutralElementResistPercent, Types.CharacterBaseCharacteristic earthElementResistPercent, Types.CharacterBaseCharacteristic waterElementResistPercent, Types.CharacterBaseCharacteristic airElementResistPercent, Types.CharacterBaseCharacteristic fireElementResistPercent, Types.CharacterBaseCharacteristic neutralElementReduction, Types.CharacterBaseCharacteristic earthElementReduction, Types.CharacterBaseCharacteristic waterElementReduction, Types.CharacterBaseCharacteristic airElementReduction, Types.CharacterBaseCharacteristic fireElementReduction, Types.CharacterBaseCharacteristic pushDamageReduction, Types.CharacterBaseCharacteristic criticalDamageReduction, Types.CharacterBaseCharacteristic pvpNeutralElementResistPercent, Types.CharacterBaseCharacteristic pvpEarthElementResistPercent, Types.CharacterBaseCharacteristic pvpWaterElementResistPercent, Types.CharacterBaseCharacteristic pvpAirElementResistPercent, Types.CharacterBaseCharacteristic pvpFireElementResistPercent, Types.CharacterBaseCharacteristic pvpNeutralElementReduction, Types.CharacterBaseCharacteristic pvpEarthElementReduction, Types.CharacterBaseCharacteristic pvpWaterElementReduction, Types.CharacterBaseCharacteristic pvpAirElementReduction, Types.CharacterBaseCharacteristic pvpFireElementReduction, Types.CharacterSpellModification[] spellModifications, int probationTime)
 {
     this.experience               = experience;
     this.experienceLevelFloor     = experienceLevelFloor;
     this.experienceNextLevelFloor = experienceNextLevelFloor;
     this.kamas                          = kamas;
     this.statsPoints                    = statsPoints;
     this.spellsPoints                   = spellsPoints;
     this.alignmentInfos                 = alignmentInfos;
     this.lifePoints                     = lifePoints;
     this.maxLifePoints                  = maxLifePoints;
     this.energyPoints                   = energyPoints;
     this.maxEnergyPoints                = maxEnergyPoints;
     this.actionPointsCurrent            = actionPointsCurrent;
     this.movementPointsCurrent          = movementPointsCurrent;
     this.initiative                     = initiative;
     this.prospecting                    = prospecting;
     this.actionPoints                   = actionPoints;
     this.movementPoints                 = movementPoints;
     this.strength                       = strength;
     this.vitality                       = vitality;
     this.wisdom                         = wisdom;
     this.chance                         = chance;
     this.agility                        = agility;
     this.intelligence                   = intelligence;
     this.range                          = range;
     this.summonableCreaturesBoost       = summonableCreaturesBoost;
     this.reflect                        = reflect;
     this.criticalHit                    = criticalHit;
     this.criticalHitWeapon              = criticalHitWeapon;
     this.criticalMiss                   = criticalMiss;
     this.healBonus                      = healBonus;
     this.allDamagesBonus                = allDamagesBonus;
     this.weaponDamagesBonusPercent      = weaponDamagesBonusPercent;
     this.damagesBonusPercent            = damagesBonusPercent;
     this.trapBonus                      = trapBonus;
     this.trapBonusPercent               = trapBonusPercent;
     this.permanentDamagePercent         = permanentDamagePercent;
     this.tackleBlock                    = tackleBlock;
     this.tackleEvade                    = tackleEvade;
     this.PAAttack                       = PAAttack;
     this.PMAttack                       = PMAttack;
     this.pushDamageBonus                = pushDamageBonus;
     this.criticalDamageBonus            = criticalDamageBonus;
     this.neutralDamageBonus             = neutralDamageBonus;
     this.earthDamageBonus               = earthDamageBonus;
     this.waterDamageBonus               = waterDamageBonus;
     this.airDamageBonus                 = airDamageBonus;
     this.fireDamageBonus                = fireDamageBonus;
     this.dodgePALostProbability         = dodgePALostProbability;
     this.dodgePMLostProbability         = dodgePMLostProbability;
     this.neutralElementResistPercent    = neutralElementResistPercent;
     this.earthElementResistPercent      = earthElementResistPercent;
     this.waterElementResistPercent      = waterElementResistPercent;
     this.airElementResistPercent        = airElementResistPercent;
     this.fireElementResistPercent       = fireElementResistPercent;
     this.neutralElementReduction        = neutralElementReduction;
     this.earthElementReduction          = earthElementReduction;
     this.waterElementReduction          = waterElementReduction;
     this.airElementReduction            = airElementReduction;
     this.fireElementReduction           = fireElementReduction;
     this.pushDamageReduction            = pushDamageReduction;
     this.criticalDamageReduction        = criticalDamageReduction;
     this.pvpNeutralElementResistPercent = pvpNeutralElementResistPercent;
     this.pvpEarthElementResistPercent   = pvpEarthElementResistPercent;
     this.pvpWaterElementResistPercent   = pvpWaterElementResistPercent;
     this.pvpAirElementResistPercent     = pvpAirElementResistPercent;
     this.pvpFireElementResistPercent    = pvpFireElementResistPercent;
     this.pvpNeutralElementReduction     = pvpNeutralElementReduction;
     this.pvpEarthElementReduction       = pvpEarthElementReduction;
     this.pvpWaterElementReduction       = pvpWaterElementReduction;
     this.pvpAirElementReduction         = pvpAirElementReduction;
     this.pvpFireElementReduction        = pvpFireElementReduction;
     this.spellModifications             = spellModifications;
     this.probationTime                  = probationTime;
 }
        public virtual void Deserialize(BigEndianReader reader)
        {
            experience = reader.ReadDouble();
            if (experience < 0)
            {
                throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0");
            }
            experienceLevelFloor = reader.ReadDouble();
            if (experienceLevelFloor < 0)
            {
                throw new Exception("Forbidden value on experienceLevelFloor = " + experienceLevelFloor + ", it doesn't respect the following condition : experienceLevelFloor < 0");
            }
            experienceNextLevelFloor = reader.ReadDouble();
            if (experienceNextLevelFloor < 0)
            {
                throw new Exception("Forbidden value on experienceNextLevelFloor = " + experienceNextLevelFloor + ", it doesn't respect the following condition : experienceNextLevelFloor < 0");
            }
            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.ReadInt();
            if (statsPoints < 0)
            {
                throw new Exception("Forbidden value on statsPoints = " + statsPoints + ", it doesn't respect the following condition : statsPoints < 0");
            }
            spellsPoints = reader.ReadInt();
            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.ReadInt();
            if (lifePoints < 0)
            {
                throw new Exception("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0");
            }
            maxLifePoints = reader.ReadInt();
            if (maxLifePoints < 0)
            {
                throw new Exception("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0");
            }
            energyPoints = reader.ReadShort();
            if (energyPoints < 0)
            {
                throw new Exception("Forbidden value on energyPoints = " + energyPoints + ", it doesn't respect the following condition : energyPoints < 0");
            }
            maxEnergyPoints = reader.ReadShort();
            if (maxEnergyPoints < 0)
            {
                throw new Exception("Forbidden value on maxEnergyPoints = " + maxEnergyPoints + ", it doesn't respect the following condition : maxEnergyPoints < 0");
            }
            actionPointsCurrent   = reader.ReadShort();
            movementPointsCurrent = reader.ReadShort();
            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.ReadShort();
            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);
            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");
            }
        }
        public virtual void Deserialize(IDataReader reader)
        {
            experience               = reader.ReadVarUhLong();
            experienceLevelFloor     = reader.ReadVarUhLong();
            experienceNextLevelFloor = reader.ReadVarUhLong();
            experienceBonusLimit     = reader.ReadVarUhLong();
            kamas             = reader.ReadVarUhLong();
            statsPoints       = reader.ReadVarUhShort();
            additionnalPoints = reader.ReadVarUhShort();
            spellsPoints      = reader.ReadVarUhShort();
            alignmentInfos    = new Types.ActorExtendedAlignmentInformations();
            alignmentInfos.Deserialize(reader);
            lifePoints            = reader.ReadVarUhInt();
            maxLifePoints         = reader.ReadVarUhInt();
            energyPoints          = reader.ReadVarUhShort();
            maxEnergyPoints       = reader.ReadVarUhShort();
            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.ReadVarUhShort();
            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);
            runeBonusPercent = new Types.CharacterBaseCharacteristic();
            runeBonusPercent.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);
            meleeDamageDonePercent = new Types.CharacterBaseCharacteristic();
            meleeDamageDonePercent.Deserialize(reader);
            meleeDamageReceivedPercent = new Types.CharacterBaseCharacteristic();
            meleeDamageReceivedPercent.Deserialize(reader);
            rangedDamageDonePercent = new Types.CharacterBaseCharacteristic();
            rangedDamageDonePercent.Deserialize(reader);
            rangedDamageReceivedPercent = new Types.CharacterBaseCharacteristic();
            rangedDamageReceivedPercent.Deserialize(reader);
            weaponDamageDonePercent = new Types.CharacterBaseCharacteristic();
            weaponDamageDonePercent.Deserialize(reader);
            weaponDamageReceivedPercent = new Types.CharacterBaseCharacteristic();
            weaponDamageReceivedPercent.Deserialize(reader);
            spellDamageDonePercent = new Types.CharacterBaseCharacteristic();
            spellDamageDonePercent.Deserialize(reader);
            spellDamageReceivedPercent = new Types.CharacterBaseCharacteristic();
            spellDamageReceivedPercent.Deserialize(reader);
            var limit = (ushort)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();
        }
 public CharacterSpellModification(sbyte modificationType, short spellId, Types.CharacterBaseCharacteristic value)
 {
     this.modificationType = modificationType;
     this.spellId = spellId;
     this.value = value;
 }