public void EquipCustomisedItem(ItemInstance item, CharacterSlot equipSlot) { _item = item; _equipSlot = equipSlot; FormItemInstance form = new FormItemInstance(); form.CharacterSlot = _equipSlot; form.ItemInstance = _item.Clone(); if (form.ShowDialog(FormMain.Instance) == DialogResult.OK) { Character[_equipSlot] = form.ItemInstance == null ? null : form.ItemInstance.Clone(); } }
void _menuItemCustomizeItem_Click(object sender, EventArgs e) { FormItemInstance form = new FormItemInstance(); form.CharacterSlot = _equipSlot; form.ItemInstance = _item.Clone(); if (form.ShowDialog(FormMain.Instance) == DialogResult.OK) { ItemInstance itemInstance = form.ItemInstance.Clone(); itemInstance.ForceDisplay = true; Character.CustomItemInstances.Add(itemInstance); Character.OnCalculationsInvalidated(); } }