private void btnChangeEvent_Click(object sender, EventArgs e)
        {
            //Pass in the event Event.
            frmEventList.eventEvent = NewEvent.EventID;
            frmEventList.p          = NewEvent._root;
            frmEventList.ShowDialog();

            //Retrieve and setup the new event according to the new event Event.
            if (frmEventList.status == DialogResult.OK)
            {
                _newEv = new Event()
                {
                    _script = _origEvent._script
                };

                NewEvent.EventID = (uint)frmEventList.eventEvent;
                EventInformation info = NewEvent.Info;

                NewEvent.Reset();
            }

            DisplayEvent();
        }
Пример #2
0
        private void btnChangeEvent_Click(object sender, EventArgs e)
        {
            //Pass in the event Event.
            frmEventList.eventEvent = eventData._event;
            frmEventList.p          = eventData.Root;
            frmEventList.ShowDialog();

            //Retrieve and setup the new event according to the new event Event.
            if (frmEventList.status == DialogResult.OK)
            {
                newEv = new MoveDefEventNode()
                {
                    _parent = origEvent.Parent
                };

                newEvent.EventID = (uint)frmEventList.eventEvent;
                ActionEventInfo info = newEvent.EventInfo;

                newEvent.NewChildren();
            }

            DisplayEvent();
        }
Пример #3
0
        private void btnChangeEvent_Click(object sender, EventArgs e)
        {
            //Pass in the event Event.
            frmEventList.eventEvent = eventData._event;
            frmEventList.p          = eventData.Root;
            frmEventList.ShowDialog();

            //Retrieve and setup the new event according to the new event Event.
            if (frmEventList.status == DialogResult.OK)
            {
                newEv = new MoveDefEventNode()
                {
                    _parent = origEvent.Parent
                };

                newEvent.EventID = (int)frmEventList.eventEvent;
                ActionEventInfo info = newEvent.EventInfo;

                if (info.Params == null)
                {
                    DisplayEvent();
                    return;
                }

                for (int i = 0; i < newEvent.numArguments; i++)
                {
                    long type = info.GetDfltParameter(i);
                    if (i >= info.Params.Length)
                    {
                        continue;
                    }

                    if ((newEvent._event == 0x06000D00 || newEvent._event == 0x06150F00 || newEvent._event == 0x062B0D00) && i == 12)
                    {
                        newEvent.AddChild(new HitboxFlagsNode(info != null ? info.Params[i] : "Value"));
                    }
                    else if (((newEvent._event == 0x06000D00 || newEvent._event == 0x06150F00 || newEvent._event == 0x062B0D00) && (i == 0 || i == 3 || i == 4)) ||
                             ((newEvent._event == 0x11001000 || newEvent._event == 0x11010A00 || newEvent._event == 0x11020A00) && i == 0))
                    {
                        newEvent.AddChild(new MoveDefEventValue2HalfNode(info != null ? info.Params[i] : "Value"));
                    }
                    else if (i == 14 && newEvent._event == 0x06150F00)
                    {
                        newEvent.AddChild(new SpecialHitboxFlagsNode(info != null ? info.Params[i] : "Value"));
                    }
                    else if ((ArgVarType)(int)type == ArgVarType.Value)
                    {
                        newEvent.AddChild(new MoveDefEventValueNode(info != null ? info.Params[i] : "Value"));
                    }
                    else if ((ArgVarType)(int)type == ArgVarType.Scalar)
                    {
                        newEvent.AddChild(new MoveDefEventScalarNode(info != null ? info.Params[i] : "Scalar"));
                    }
                    else if ((ArgVarType)(int)type == ArgVarType.Boolean)
                    {
                        newEvent.AddChild(new MoveDefEventBoolNode(info != null ? info.Params[i] : "Boolean"));
                    }
                    else if ((ArgVarType)(int)type == ArgVarType.Unknown)
                    {
                        newEvent.AddChild(new MoveDefEventUnkNode(info != null ? info.Params[i] : "Unknown"));
                    }
                    else if ((ArgVarType)(int)type == ArgVarType.Requirement)
                    {
                        newEvent.AddChild(new MoveDefEventRequirementNode(info != null ? info.Params[i] : "Requirement"));
                    }
                    else if ((ArgVarType)(int)type == ArgVarType.Variable)
                    {
                        newEvent.AddChild(new MoveDefEventVariableNode(info != null ? info.Params[i] : "Variable"));
                    }
                    else if ((ArgVarType)(int)type == ArgVarType.Offset)
                    {
                        newEvent.AddChild(new MoveDefEventOffsetNode(info != null ? info.Params[i] : "Offset"));
                    }
                }
            }

            DisplayEvent();
        }