コード例 #1
0
        private void recalculateStats()
        {
            int vit   = (int)nudVitality.Value;
            int att   = (int)nudAttunement.Value;
            int end   = (int)nudEndurance.Value;
            int str   = (int)nudStrength.Value;
            int dex   = (int)nudDexterity.Value;
            int res   = (int)nudResistance.Value;
            int intel = (int)nudIntelligence.Value;
            int fth   = (int)nudFaith.Value;

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

            sl += vit - charClass.Vitality;
            sl += att - charClass.Attunement;
            sl += end - charClass.Endurance;
            sl += str - charClass.Strength;
            sl += dex - charClass.Dexterity;
            sl += res - charClass.Resistance;
            sl += intel - charClass.Intelligence;
            sl += fth - charClass.Faith;

            //dsrProcess.LevelUp(vit, att, end, str, dex, res, intel, fth, sl);
        }
コード例 #2
0
        private void cmbClass_SelectedIndexChanged(object sender, EventArgs e)
        {
            DSRClass charClass = cmbClass.SelectedItem as DSRClass;

            nudVitality.Minimum     = charClass.Vitality;
            nudAttunement.Minimum   = charClass.Attunement;
            nudEndurance.Minimum    = charClass.Endurance;
            nudStrength.Minimum     = charClass.Strength;
            nudDexterity.Minimum    = charClass.Dexterity;
            nudResistance.Minimum   = charClass.Resistance;
            nudIntelligence.Minimum = charClass.Intelligence;
            nudFaith.Minimum        = charClass.Faith;

            if (!reading)
            {
                //dsrProcess.SetClass(charClass.ID);
                //recalculateStats();
            }
        }