Ejemplo n.º 1
0
 public PlayerStats(PlayedCharacter owner, CharacterCharacteristicsInformations stats)
 {
     if (stats == null) throw new ArgumentNullException("stats");
     Fields = new Dictionary<PlayerField, StatsRow>();
     SpellsModifications = new ObservableCollection<SpellModification>();
     Update(stats);
 }
Ejemplo n.º 2
0
 public PlayerStats(PlayedCharacter owner, CharacterCharacteristicsInformations stats)
     : this()
 {
     if (stats == null) throw new ArgumentNullException("stats");
     Update(stats);
 }
Ejemplo n.º 3
0
        public void Update(CharacterCharacteristicsInformations stats)
        {
            if (stats == null) throw new ArgumentNullException("stats");
            Experience = stats.experience;
            ExperienceLevelFloor = stats.experienceLevelFloor;
            ExperienceNextLevelFloor = stats.experienceNextLevelFloor;

            Kamas = stats.kamas;
            StatsPoints = stats.statsPoints;
            SpellsPoints = stats.spellsPoints;
            Health = stats.lifePoints;
            MaxHealth = stats.maxLifePoints;

            EnergyPoints = stats.energyPoints;
            MaxEnergyPoints = stats.maxEnergyPoints;
            CurrentAP = stats.actionPointsCurrent;
            CurrentMP = stats.movementPointsCurrent;

            this[PlayerField.Initiative].Update(stats.initiative);
            this[PlayerField.Prospecting].Update(stats.prospecting);
            this[PlayerField.AP].Update(stats.actionPoints);
            this[PlayerField.MP].Update(stats.movementPoints);
            this[PlayerField.Strength].Update(stats.strength);
            this[PlayerField.Vitality].Update(stats.vitality);
            this[PlayerField.Wisdom].Update(stats.wisdom);
            this[PlayerField.Chance].Update(stats.chance);
            this[PlayerField.Agility].Update(stats.agility);
            this[PlayerField.Intelligence].Update(stats.intelligence);
            this[PlayerField.Range].Update(stats.range);
            this[PlayerField.SummonLimit].Update(stats.summonableCreaturesBoost);
            this[PlayerField.DamageReflection].Update(stats.reflect);
            this[PlayerField.CriticalHit].Update(stats.criticalHit);
            this[PlayerField.CriticalMiss].Update(stats.criticalMiss);
            this[PlayerField.HealBonus].Update(stats.healBonus);
            this[PlayerField.DamageBonus].Update(stats.allDamagesBonus);
            this[PlayerField.WeaponDamageBonusPercent].Update(stats.weaponDamagesBonusPercent);
            this[PlayerField.DamageBonusPercent].Update(stats.damagesBonusPercent);
            this[PlayerField.TrapBonus].Update(stats.trapBonus);
            this[PlayerField.TrapBonusPercent].Update(stats.trapBonusPercent);
            this[PlayerField.PermanentDamagePercent].Update(stats.permanentDamagePercent);
            this[PlayerField.TackleBlock].Update(stats.tackleBlock);
            this[PlayerField.TackleEvade].Update(stats.tackleEvade);
            this[PlayerField.APAttack].Update(stats.PAAttack);
            this[PlayerField.MPAttack].Update(stats.PMAttack);
            this[PlayerField.PushDamageBonus].Update(stats.pushDamageBonus);
            this[PlayerField.CriticalDamageBonus].Update(stats.criticalDamageBonus);
            this[PlayerField.NeutralDamageBonus].Update(stats.neutralDamageBonus);
            this[PlayerField.EarthDamageBonus].Update(stats.earthDamageBonus);
            this[PlayerField.WaterDamageBonus].Update(stats.waterDamageBonus);
            this[PlayerField.AirDamageBonus].Update(stats.airDamageBonus);
            this[PlayerField.FireDamageBonus].Update(stats.fireDamageBonus);
            this[PlayerField.DodgeAPProbability].Update(stats.dodgePALostProbability);
            this[PlayerField.DodgeMPProbability].Update(stats.dodgePMLostProbability);
            this[PlayerField.NeutralResistPercent].Update(stats.neutralElementResistPercent);
            this[PlayerField.EarthResistPercent].Update(stats.earthElementResistPercent);
            this[PlayerField.WaterResistPercent].Update(stats.waterElementResistPercent);
            this[PlayerField.AirResistPercent].Update(stats.airElementResistPercent);
            this[PlayerField.FireResistPercent].Update(stats.fireElementResistPercent);
            this[PlayerField.NeutralElementReduction].Update(stats.neutralElementReduction);
            this[PlayerField.EarthElementReduction].Update(stats.earthElementReduction);
            this[PlayerField.WaterElementReduction].Update(stats.waterElementReduction);
            this[PlayerField.AirElementReduction].Update(stats.airElementReduction);
            this[PlayerField.FireElementReduction].Update(stats.fireElementReduction);
            this[PlayerField.PushDamageReduction].Update(stats.pushDamageReduction);
            this[PlayerField.CriticalDamageReduction].Update(stats.criticalDamageReduction);
            this[PlayerField.PvpNeutralResistPercent].Update(stats.pvpNeutralElementResistPercent);
            this[PlayerField.PvpEarthResistPercent].Update(stats.pvpEarthElementResistPercent);
            this[PlayerField.PvpWaterResistPercent].Update(stats.pvpWaterElementResistPercent);
            this[PlayerField.PvpAirResistPercent].Update(stats.pvpAirElementResistPercent);
            this[PlayerField.PvpFireResistPercent].Update(stats.pvpFireElementResistPercent);
            this[PlayerField.PvpNeutralElementReduction].Update(stats.pvpNeutralElementReduction);
            this[PlayerField.PvpEarthElementReduction].Update(stats.pvpEarthElementReduction);
            this[PlayerField.PvpWaterElementReduction].Update(stats.pvpWaterElementReduction);
            this[PlayerField.AirElementReduction].Update(stats.pvpAirElementReduction);
            this[PlayerField.PvpFireElementReduction].Update(stats.pvpFireElementReduction);

            SpellsModifications.Clear();
            foreach (SpellModification spell in stats.spellModifications.Select(entry => new SpellModification(entry)))
            {
                SpellsModifications.Add(spell);
            }

            OnPropertyChanged(Binding.IndexerName);
        }