Example #1
0
        public void UpdateFromConfigurationPair(string statname, string value)
        {
            switch (statname)
            {
            // base stats
            case "strength":
                Strength = StatType.Parse(value);
                break;

            case "agility":
                Agility = StatType.Parse(value);
                break;

            case "intellect":
                Intellect = StatType.Parse(value);
                break;

            case "wisdom":
                Wisdom = StatType.Parse(value);
                break;

            case "weapon_expertise":
                WeaponExpertise = StatType.Parse(value);
                break;

            case "resolve":
                Resolve = StatType.Parse(value);
                break;

            // derived stats
            case "block_chance":
                BaseBlockChance = StatType.Parse(value);
                break;

            case "dodge_chance":
                BaseDodgeChance = StatType.Parse(value);
                break;

            case "counter_chance":
                BaseCounterChance = StatType.Parse(value);
                break;

            case "hit_points":
                BaseHitPoints = StatType.Parse(value);
                break;

            case "spell_power":
                BaseSpellPower = StatType.Parse(value);
                break;

            case "max_mana":
                BaseMaxMana = StatType.Parse(value);
                break;

            case "mana_regen":
                BaseManaRegeneration = StatType.Parse(value);
                break;

            case "spell_crit_chance":
                BaseSpellCriticalChance = StatType.Parse(value);
                break;

            case "spell_crit_mult":
                BaseSpellCriticalDamageMultiplier = StatType.Parse(value);
                break;

            case "brute_physical_power_mult":
                BaseBrutePhysicalPower = StatType.Parse(value);
                break;

            case "finesse_physical_power_mult":
                BaseFinessePhyiscalPower = StatType.Parse(value);
                break;

            case "physical_crit_chance":
                BasePhysicalCriticalChance = StatType.Parse(value);
                break;

            case "physical_crit_mult":
                BasePhysicalCriticalDamageMultiplier = StatType.Parse(value);
                break;

            case "dodge_reduction":
                BaseDodgeReduction = StatType.Parse(value);
                break;

            default: throw new InvalidOperationException();
            }
        }