Exemplo n.º 1
0
        void SpellsetAddSpellClick(object sender, EventArgs e)
        {
            MonsterSpellForm form = new MonsterSpellForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                MonsterXfer.SpellEntry entry = form.GetSpell();
                customSpellSet.Items.Add(entry);
                Xfer.KnownSpells.Add(entry);
            }
        }
Exemplo n.º 2
0
        void CustomSpellSetDoubleClick(object sender, EventArgs e)
        {
            int index = customSpellSet.SelectedIndex;

            if (index >= 0)
            {
                MonsterSpellForm form = new MonsterSpellForm();
                form.SetSpell(Xfer.KnownSpells[index]);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    Xfer.KnownSpells[index]     = form.GetSpell();
                    customSpellSet.Items[index] = Xfer.KnownSpells[index];
                }
            }
        }