Esempio n. 1
0
        private void RecalculateStats()
        {
            int vitality     = (int)nudVit.Value;
            int attunement   = (int)nudAtt.Value;
            int endurance    = (int)nudEnd.Value;
            int strength     = (int)nudStr.Value;
            int dexterity    = (int)nudDex.Value;
            int resistance   = (int)nudRes.Value;
            int intelligence = (int)nudInt.Value;
            int faith        = (int)nudFth.Value;

            DSClass charClass = cmbClass.SelectedItem as DSClass;
            int     sl        = charClass.SoulLevel;

            sl += vitality - charClass.Vitality;
            sl += attunement - charClass.Attunement;
            sl += endurance - charClass.Endurance;
            sl += strength - charClass.Strength;
            sl += dexterity - charClass.Dexterity;
            sl += resistance - charClass.Resistance;
            sl += intelligence - charClass.Intelligence;
            sl += faith - charClass.Faith;

            Hook.LevelUp(vitality, attunement, endurance, strength, dexterity, resistance, intelligence, faith, sl);
        }
Esempio n. 2
0
        private void cmbClass_SelectedIndexChanged(object sender, EventArgs e)
        {
            DSClass charClass = cmbClass.SelectedItem as DSClass;

            nudVit.Minimum = charClass.Vitality;
            nudAtt.Minimum = charClass.Attunement;
            nudEnd.Minimum = charClass.Endurance;
            nudStr.Minimum = charClass.Strength;
            nudDex.Minimum = charClass.Dexterity;
            nudRes.Minimum = charClass.Resistance;
            nudInt.Minimum = charClass.Intelligence;
            nudFth.Minimum = charClass.Faith;
            if (!Reading)
            {
                Hook.Class = charClass.ID;
                RecalculateStats();
            }
        }