Exemple #1
0
        private void LetTest(object sender, EventArgs e)
        {
            var selected = PickClassIdList.SelectedItem.ToString().Split(new char[0]);

            ClassId_textBox.Text = selected[0];
            PickedClassId.Text   = selected[1];

            PickClassId_button.Text = "Pick ClassId";
            PickClassIdList.Items.Clear();
            PickClassIdList.Hide();
            return;
        }
Exemple #2
0
        private void PickClassId_MouseClick(object sender, MouseEventArgs e)
        {
            if (PickClassIdList.Visible == true)
            {
                if (PickClassIdList.SelectedItem != null)
                {
                    var selected = PickClassIdList.SelectedItem.ToString().Split(new char[0]);

                    ClassId_textBox.Text = selected[0];
                    PickedClassId.Text   = selected[1];
                }

                PickClassId_button.Text = "Pick ClassId";
                PickClassIdList.Items.Clear();
                PickClassIdList.Hide();
                return;
            }

            foreach (var creature in Program.LoadedCreatures)
            {
                var isNpc = true;

                if (IsNpc_checkBox.CheckState == CheckState.Checked)
                {
                    isNpc = false;

                    foreach (var aug in creature.Value.Augmentations)
                    {
                        if (aug == AugmentationType.NPC)
                        {
                            isNpc = true;
                        }
                    }

                    if (!isNpc)
                    {
                        continue;
                    }
                }
                PickClassIdList.Items.Add(creature.Value.ClassId.ToString() + " " + creature.Value.ClassName);
            }

            PickClassIdList.Show();
            PickClassId_button.Text = "Select ClassId";
        }