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

            spellModifications = new CharacterSpellModification[limit];
            for (int i = 0; i < limit; i++)
            {
                spellModifications[i] = new 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 CharacterSpellModification(sbyte modificationType, ushort spellId, CharacterBaseCharacteristic value)
 {
     this.modificationType = modificationType;
     this.spellId          = spellId;
     this.value            = value;
 }