Esempio n. 1
0
        private void cmdDeleteAbility_Click(object sender, EventArgs e)
        {
            //TODO Deleting an ability does not cause the CP's to recalculate.
            Ability selectedAbility = null;

            if (listBoxAttacksBasic.SelectedIndex != -1)
            {
                selectedAbility = (Ability)listBoxAttacksBasic.Items[listBoxAttacksBasic.SelectedIndex];
            }
            if (listBoxAttacksSpecial.SelectedIndex != -1)
            {
                selectedAbility = (Ability)listBoxAttacksSpecial.Items[listBoxAttacksSpecial.SelectedIndex];
            }
            if (listBoxAbilities.SelectedIndex != -1)
            {
                selectedAbility = (Ability)listBoxAbilities.Items[listBoxAbilities.SelectedIndex];
            }

            character.removeAbility(selectedAbility);

            refreshListBoxes();
        }