private void UpdateEditor() { if (mEditorItem != null) { pnlContainer.Show(); txtName.Text = mEditorItem.Name; cmbFolder.Text = mEditorItem.Folder; txtDesc.Text = mEditorItem.Description; cmbType.SelectedIndex = (int)mEditorItem.SpellType; nudCastDuration.Value = mEditorItem.CastDuration; nudCooldownDuration.Value = mEditorItem.CooldownDuration; cmbCooldownGroup.SelectedItem = mEditorItem.CooldownGroup; chkIgnoreGlobalCooldown.Checked = mEditorItem.IgnoreGlobalCooldown; chkIgnoreCdr.Checked = mEditorItem.IgnoreCooldownReduction; cmbCastAnimation.SelectedIndex = AnimationBase.ListIndex(mEditorItem.CastAnimationId) + 1; cmbHitAnimation.SelectedIndex = AnimationBase.ListIndex(mEditorItem.HitAnimationId) + 1; chkBound.Checked = mEditorItem.Bound; cmbSprite.SelectedIndex = cmbSprite.FindString(TextUtils.NullToNone(mEditorItem.Icon)); picSpell.BackgroundImage?.Dispose(); picSpell.BackgroundImage = null; if (cmbSprite.SelectedIndex > 0) { picSpell.BackgroundImage = Image.FromFile("resources/spells/" + cmbSprite.Text); } nudHPCost.Value = mEditorItem.VitalCost[(int)Vitals.Health]; nudMpCost.Value = mEditorItem.VitalCost[(int)Vitals.Mana]; txtCannotCast.Text = mEditorItem.CannotCastMessage; UpdateSpellTypePanels(); if (mChanged.IndexOf(mEditorItem) == -1) { mChanged.Add(mEditorItem); mEditorItem.MakeBackup(); } } else { pnlContainer.Hide(); } UpdateToolStripItems(); }