Beispiel #1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.Add      = !Convert.ToBoolean(cmbAction.SelectedIndex);
     mMyCommand.ItemId   = ItemBase.IdFromList(cmbItem.SelectedIndex);
     mMyCommand.Quantity = (int)nudGiveTakeAmount.Value;
     mEventEditor.FinishCommandEdit();
 }
        private void btnSave_Click(object sender, EventArgs e)
        {
            mMyCommand.VariableType = rdoPlayerVariable.Checked ? VariableTypes.PlayerVariable : VariableTypes.ServerVariable;
            mMyCommand.VariableId   = rdoPlayerVariable.Checked ? PlayerVariableBase.IdFromList(cmbVariable.SelectedIndex, VariableDataTypes.Integer) : ServerVariableBase.IdFromList(cmbVariable.SelectedIndex, VariableDataTypes.Integer);

            mEventEditor.FinishCommandEdit();
        }
Beispiel #3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.File      = cmbPicture.Text;
     mMyCommand.Size      = cmbSize.SelectedIndex;
     mMyCommand.Clickable = chkClick.Checked;
     mEventEditor.FinishCommandEdit();
 }
        private void btnSave_Click(object sender, EventArgs e)
        {
            mMyCommand.NpcId = NpcBase.IdFromList(cmbNpc.SelectedIndex);
            switch (cmbConditionType.SelectedIndex)
            {
            case 0:     //Tile Spawn
                mMyCommand.EntityId = Guid.Empty;
                mMyCommand.MapId    = MapList.OrderedMaps[cmbMap.SelectedIndex].MapId;
                mMyCommand.X        = (sbyte)nudWarpX.Value;
                mMyCommand.Y        = (sbyte)nudWarpY.Value;
                mMyCommand.Dir      = (byte)cmbDirection.SelectedIndex;

                break;

            case 1:     //On/Around Entity Spawn
                mMyCommand.MapId = Guid.Empty;
                if (cmbEntities.SelectedIndex == 0 || cmbEntities.SelectedIndex == -1)
                {
                    mMyCommand.EntityId = Guid.Empty;
                }
                else
                {
                    mMyCommand.EntityId = mCurrentMap.LocalEvents.Keys.ToList()[cmbEntities.SelectedIndex - 1];
                }

                mMyCommand.X   = (sbyte)mSpawnX;
                mMyCommand.Y   = (sbyte)mSpawnY;
                mMyCommand.Dir = (byte)Convert.ToInt32(chkDirRelative.Checked);

                break;
            }

            mEventEditor.FinishCommandEdit();
        }
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.Text    = txtAddText.Text;
     mMyCommand.Color   = cmbColor.Text;
     mMyCommand.Channel = (ChatboxChannel)cmbChannel.SelectedIndex;
     mEventEditor.FinishCommandEdit();
 }
Beispiel #6
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.MapId     = MapList.OrderedMaps[cmbMap.SelectedIndex].MapId;
     mMyCommand.X         = (byte)scrlX.Value;
     mMyCommand.Y         = (byte)scrlY.Value;
     mMyCommand.Direction = (WarpDirection)cmbDirection.SelectedIndex;
     mEventEditor.FinishCommandEdit();
 }
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (cmbClass.SelectedIndex > -1)
            {
                mMyCommand.ClassId = ClassBase.IdFromList(cmbClass.SelectedIndex);
            }

            mEventEditor.FinishCommandEdit();
        }
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.File            = cmbPicture.Text;
     mMyCommand.Size            = cmbSize.SelectedIndex;
     mMyCommand.Clickable       = chkClick.Checked;
     mMyCommand.HideTime        = (int)nudHideTime.Value;
     mMyCommand.WaitUntilClosed = chkWaitUntilClosed.Checked;
     mEventEditor.FinishCommandEdit();
 }
        private void btnSave_Click(object sender, EventArgs e)
        {
            mMyCommand.AnimationId = AnimationBase.IdFromList(cmbAnimation.SelectedIndex);
            switch (cmbConditionType.SelectedIndex)
            {
            case 0:     //Tile Spawn
                mMyCommand.EntityId = Guid.Empty;
                mMyCommand.MapId    = MapList.OrderedMaps[cmbMap.SelectedIndex].MapId;
                mMyCommand.X        = (sbyte)nudWarpX.Value;
                mMyCommand.Y        = (sbyte)nudWarpY.Value;
                mMyCommand.Dir      = (byte)cmbDirection.SelectedIndex;

                break;

            case 1:     //On/Around Entity Spawn
                mMyCommand.MapId = Guid.Empty;
                if (cmbEntities.SelectedIndex == 0 || cmbEntities.SelectedIndex == -1)
                {
                    mMyCommand.EntityId = Guid.Empty;
                }
                else
                {
                    mMyCommand.EntityId = mCurrentMap.LocalEvents.Keys.ToList()[cmbEntities.SelectedIndex - 1];
                }

                mMyCommand.X = (sbyte)mSpawnX;
                mMyCommand.Y = (sbyte)mSpawnY;
                if (chkRelativeLocation.Checked && chkRotateDirection.Checked)
                {
                    mMyCommand.Dir = 3;

                    //0 does not adhere to direction, 1 is Spawning Relative to Direction, 2 is Rotating Relative to Direction, and 3 is both.
                }
                else if (chkRelativeLocation.Checked)
                {
                    mMyCommand.Dir = 1;

                    //0 does not adhere to direction, 1 is Spawning Relative to Direction, 2 is Rotating Relative to Direction, and 3 is both.
                }
                else if (chkRotateDirection.Checked)
                {
                    mMyCommand.Dir = 2;

                    //0 does not adhere to direction, 1 is Spawning Relative to Direction, 2 is Rotating Relative to Direction, and 3 is both.
                }
                else
                {
                    mMyCommand.Dir = 0;

                    //0 does not adhere to direction, 1 is Spawning Relative to Direction, 2 is Rotating Relative to Direction, and 3 is both.
                }

                break;
            }

            mEventEditor.FinishCommandEdit();
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (cmbTable.SelectedIndex > -1)
            {
                mMyCommand.CraftingTableId = CraftingTableBase.IdFromList(cmbTable.SelectedIndex);
            }

            mEventEditor.FinishCommandEdit();
        }
Beispiel #11
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            mMyCommand.Color = Color.FromArgb(
                pnlColor.BackColor.A, pnlColor.BackColor.R, pnlColor.BackColor.G, pnlColor.BackColor.B
                );

            mMyCommand.Override = chkOverride.Checked;
            mMyCommand.Remove   = chkRemove.Checked;
            mEventEditor.FinishCommandEdit();
        }
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.Text       = txtShowOptions.Text;
     mMyCommand.Options[0] = txtShowOptionsOpt1.Text;
     mMyCommand.Options[1] = txtShowOptionsOpt2.Text;
     mMyCommand.Options[2] = txtShowOptionsOpt3.Text;
     mMyCommand.Options[3] = txtShowOptionsOpt4.Text;
     mMyCommand.Face       = TextUtils.SanitizeNone(cmbFace.Text);
     mEventEditor.FinishCommandEdit();
 }
        private void btnSave_Click(object sender, EventArgs e)
        {
            mMyCommand.Add          = !Convert.ToBoolean(cmbAction.SelectedIndex);
            mMyCommand.ItemId       = ItemBase.IdFromList(cmbItem.SelectedIndex);
            mMyCommand.VariableType = rdoPlayerVariable.Checked ? VariableTypes.PlayerVariable : VariableTypes.ServerVariable;
            mMyCommand.UseVariable  = !rdoManual.Checked;
            mMyCommand.VariableId   = rdoPlayerVariable.Checked ? PlayerVariableBase.IdFromList(cmbVariable.SelectedIndex, VariableDataTypes.Integer) : ServerVariableBase.IdFromList(cmbVariable.SelectedIndex, VariableDataTypes.Integer);

            mMyCommand.Quantity     = (int)nudGiveTakeAmount.Value;
            mMyCommand.ItemHandling = (ItemHandling)cmbMethod.SelectedIndex;
            mEventEditor.FinishCommandEdit();
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            mMyCommand.Color = Color.FromArgb(
                pnlColor.BackColor.A, pnlColor.BackColor.R, pnlColor.BackColor.G, pnlColor.BackColor.B
                );

            mMyCommand.MatchNameColor = chkPlayerNameColor.Checked;
            mMyCommand.Position       = cmbPosition.SelectedIndex;
            mMyCommand.Value          = txtLabel.Text;

            mEventEditor.FinishCommandEdit();
        }
Beispiel #15
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            int n;

            if (rdoPlayerVariable.Checked)
            {
                mMyCommand.VariableType = VariableTypes.PlayerVariable;
                mMyCommand.VariableId   = PlayerVariableBase.IdFromList(cmbVariable.SelectedIndex);
            }

            if (rdoGlobalVariable.Checked)
            {
                mMyCommand.VariableType = VariableTypes.ServerVariable;
                mMyCommand.VariableId   = ServerVariableBase.IdFromList(cmbVariable.SelectedIndex);
            }

            if (grpNumericVariable.Visible)
            {
                mMyCommand.Modification = GetNumericVariableMod();
            }
            else if (grpBooleanVariable.Visible)
            {
                mMyCommand.Modification = GetBooleanVariableMod();
            }
            else if (grpStringVariable.Visible)
            {
                mMyCommand.Modification = GetStringVariableMod();
            }
            else
            {
                if (mMyCommand.Modification == null)
                {
                    mMyCommand.Modification = new BooleanVariableMod();
                }
                else
                {
                    if (mMyCommand.Modification.GetType() == typeof(BooleanVariableMod))
                    {
                        mMyCommand.Modification = GetBooleanVariableMod();
                    }
                    else if (mMyCommand.Modification.GetType() == typeof(IntegerVariableMod))
                    {
                        mMyCommand.Modification = GetNumericVariableMod();
                    }
                }
            }

            mMyCommand.SyncParty = chkSyncParty.Checked;

            mEventEditor.FinishCommandEdit();
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (mMyCommand is RestoreHpCommand)
            {
                ((RestoreHpCommand)mMyCommand).Amount = (int)nudVital.Value;
            }

            if (mMyCommand is RestoreMpCommand)
            {
                ((RestoreMpCommand)mMyCommand).Amount = (int)nudVital.Value;
            }

            mEventEditor.FinishCommandEdit();
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (!mEditingEvent.CommonEvent)
            {
                if (cmbEntities.SelectedIndex == 0)
                {
                    mEditingCommand.TargetId = Guid.Empty;
                }
                else
                {
                    mEditingCommand.TargetId = mCurrentMap.LocalEvents.Keys.ToList()[cmbEntities.SelectedIndex - 1];
                }
            }

            mEventEditor.FinishCommandEdit();
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            mMyCommand.Text    = txtText.Text;
            mMyCommand.Title   = txtTitle.Text;
            mMyCommand.Maximum = (int)nudMaxVal.Value;
            mMyCommand.Minimum = (int)nudMinVal.Value;

            if (rdoPlayerVariables.Checked)
            {
                mMyCommand.VariableType = Enums.VariableTypes.PlayerVariable;
                mMyCommand.VariableId   = PlayerVariableBase.IdFromList(cmbVariable.SelectedIndex);
            }
            else
            {
                mMyCommand.VariableType = Enums.VariableTypes.ServerVariable;
                mMyCommand.VariableId   = ServerVariableBase.IdFromList(cmbVariable.SelectedIndex);
            }

            mEventEditor.FinishCommandEdit();
        }
Beispiel #19
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            mMyCommand.QuestId = QuestBase.IdFromList(cmbQuests.SelectedIndex);
            if (cmbQuests.SelectedIndex > -1)
            {
                var quest = QuestBase.Get(QuestBase.IdFromList(cmbQuests.SelectedIndex));
                if (quest != null)
                {
                    var i = -1;
                    foreach (var task in quest.Tasks)
                    {
                        i++;
                        if (i == cmbQuestTask.SelectedIndex)
                        {
                            mMyCommand.TaskId = task.Id;
                        }
                    }
                }
            }

            mEventEditor.FinishCommandEdit();
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            SaveFormValues((dynamic)Condition);
            Condition.Negated = chkNegated.Checked;

            if (mEventCommand != null)
            {
                mEventCommand.Condition = Condition;
            }

            if (mEventEditor != null)
            {
                mEventEditor.FinishCommandEdit();
            }
            else
            {
                if (ParentForm != null)
                {
                    ParentForm.Close();
                }
            }
        }
        private void btnOkay_Click(object sender, EventArgs e)
        {
            mEditingRoute.CopyFrom(mTmpMoveRoute);
            mEditingRoute.Target = Guid.Empty;
            if (mEditingCommand != null)
            {
                if (!mEditingEvent.CommonEvent)
                {
                    if (cmbTarget.SelectedIndex == 0)
                    {
                        mEditingRoute.Target = Guid.Empty;
                    }
                    else
                    {
                        mEditingRoute.Target = mCurrentMap.LocalEvents.Keys.ToList()[cmbTarget.SelectedIndex - 1];
                    }
                }

                mEventEditor.FinishCommandEdit(true);
            }

            mEventEditor.CloseMoveRouteDesigner(this);
        }
Beispiel #22
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.Time = (int)nudWait.Value;
     mEventEditor.FinishCommandEdit();
 }
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.ItemId = ItemBase.IdFromList(cmbItem.SelectedIndex);
     mEventEditor.FinishCommandEdit();
 }
Beispiel #24
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.Color = new Color((byte)nudRgbaA.Value, (byte)nudRgbaR.Value, (byte)nudRgbaG.Value, (byte)nudRgbaB.Value);
     mEventEditor.FinishCommandEdit();
 }
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.Label = txtLabel.Text;
     mEventEditor.FinishCommandEdit();
 }
Beispiel #26
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.File = TextUtils.SanitizeNone(cmbBgm?.Text);
     mEventEditor.FinishCommandEdit();
 }
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.Sprite = cmbSprite.Text;
     mEventEditor.FinishCommandEdit();
 }
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.QuestId = QuestBase.IdFromList(cmbQuests.SelectedIndex);
     mMyCommand.Offer   = chkShowOfferWindow.Checked;
     mEventEditor.FinishCommandEdit();
 }
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.VariableId = PlayerVariableBase.IdFromList(cmbVariable.SelectedIndex);
     mEventEditor.FinishCommandEdit();
 }
 private void btnSave_Click(object sender, EventArgs e)
 {
     mMyCommand.Text = txtShowText.Text;
     mMyCommand.Face = TextUtils.SanitizeNone(cmbFace?.Text);
     mEventEditor.FinishCommandEdit();
 }