public EventCommandChangeSpells(ChangeSpellsCommand refCommand, EventPage refPage, FrmEvent editor) { InitializeComponent(); mMyCommand = refCommand; mEventEditor = editor; mCurrentPage = refPage; InitLocalization(); cmbSpell.Items.Clear(); cmbSpell.Items.AddRange(SpellBase.Names); cmbAction.SelectedIndex = refCommand.Add ? 0 : 1; cmbSpell.SelectedIndex = SpellBase.ListIndex(mMyCommand.SpellId); }
private static string GetCommandText(ChangeSpellsCommand command, MapInstance map) { if (command.Add) { return(Strings.EventCommandList.changespells.ToString( Strings.EventCommandList.teach.ToString(SpellBase.GetName(command.SpellId)) )); } return(Strings.EventCommandList.changespells.ToString( Strings.EventCommandList.forget.ToString(SpellBase.GetName(command.SpellId)) )); }