private static string GetCommandText(ChangeItemsCommand command, MapInstance map)
        {
            if (command.Add)
            {
                return(Strings.EventCommandList.changeitems.ToString(
                           Strings.EventCommandList.give.ToString(ItemBase.GetName(command.ItemId))
                           ));
            }

            return(Strings.EventCommandList.changeitems.ToString(
                       Strings.EventCommandList.take.ToString(ItemBase.GetName(command.ItemId))
                       ));
        }
        public EventCommandChangeItems(ChangeItemsCommand refCommand, EventPage refPage, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;
            mCurrentPage = refPage;
            InitLocalization();
            cmbItem.Items.Clear();
            cmbItem.Items.AddRange(ItemBase.Names);
            cmbAction.SelectedIndex = mMyCommand.Add ? 0 : 1;
            cmbItem.SelectedIndex   = ItemBase.ListIndex(mMyCommand.ItemId);
            cmbMethod.SelectedIndex = (int)mMyCommand.ItemHandling;

            rdoVariable.Checked       = mMyCommand.UseVariable;
            rdoGlobalVariable.Checked = mMyCommand.VariableType == VariableTypes.ServerVariable;

            SetupAmountInput();
        }
Beispiel #3
0
        public EventCommandChangeItems(ChangeItemsCommand refCommand, EventPage refPage, FrmEvent editor)
        {
            InitializeComponent();
            mMyCommand   = refCommand;
            mEventEditor = editor;
            mCurrentPage = refPage;
            InitLocalization();
            cmbItem.Items.Clear();
            cmbItem.Items.AddRange(ItemBase.Names);
            cmbAction.SelectedIndex = mMyCommand.Add ? 0 : 1;
            cmbItem.SelectedIndex   = ItemBase.ListIndex(mMyCommand.ItemId);
            if (mMyCommand.Quantity < 1)
            {
                nudGiveTakeAmount.Value = 1;
            }
            else
            {
                nudGiveTakeAmount.Value = mMyCommand.Quantity;
            }

            lblAmount.Text = Strings.EventChangeItems.amount;
        }