public void SetManualScript(uint crc)
        {
            bool changed = false;

            if (cb_section.Text.Equals("GAME") && Runtime.Moveset.Game.Scripts.ContainsKey(crc))
            {
                richTextBox1.Text = ACMDDecompiler.DecompileCommands((ACMDScript)Runtime.Moveset.Game.Scripts[crc]);
                changed           = true;
            }
            if (cb_section.Text.Equals("SOUND") && Runtime.Moveset.Sound.Scripts.ContainsKey(crc))
            {
                richTextBox1.Text = ACMDDecompiler.DecompileCommands((ACMDScript)Runtime.Moveset.Sound.Scripts[crc]);
                changed           = true;
            }
            if (cb_section.Text.Equals("EXPRESSION") && Runtime.Moveset.Expression.Scripts.ContainsKey(crc))
            {
                richTextBox1.Text = ACMDDecompiler.DecompileCommands((ACMDScript)Runtime.Moveset.Expression.Scripts[crc]);
                changed           = true;
            }
            if (cb_section.Text.Equals("EFFECT") && Runtime.Moveset.Effect.Scripts.ContainsKey(crc))
            {
                richTextBox1.Text = ACMDDecompiler.DecompileCommands((ACMDScript)Runtime.Moveset.Effect.Scripts[crc]);
                changed           = true;
            }

            if (Runtime.Moveset.ScriptsHashList.Contains(crc))
            {
                Runtime.scriptId = Runtime.Moveset.ScriptsHashList.IndexOf(crc);
            }

            if (Runtime.Moveset.Game.Scripts.ContainsKey(crc))
            {
                Runtime.gameAcmdScript = new ForgeACMDScript((ACMDScript)Runtime.Moveset.Game.Scripts[crc]);
                if (Runtime.vbnViewport != null && Runtime.TargetAnim != null)
                {
                    Runtime.vbnViewport.setAnimMaxFrames(Runtime.TargetAnim);
                }
            }

            if (changed)
            {
                this.crc = crc;
                set      = true;

                //HighlightSyntax();
                //Update game script
            }
            else
            {
                richTextBox1.Text = "";
            }
        }
        public void SetAnimation(uint crc)
        {
            //If manually set the crc ignore viewport handleACMD
            if (manualCrc)
            {
                return;
            }

            //Activate flag to ignore selectedIndexChanged event when updating Text
            ignoreTextChangedEvent = true;
            if (crcDict.ContainsKey(crc))
            {
                cb_crc.Text = crcDict[crc];
            }

            bool changed = false;

            if (cb_section.Text.Equals("GAME") && Owner.MovesetManager.Game.Scripts.ContainsKey(crc))
            {
                richTextBox1.Text = ACMDDecompiler.DecompileCommands((ACMDScript)Owner.MovesetManager.Game.Scripts[crc]);
                changed           = true;
            }
            if (cb_section.Text.Equals("SOUND") && Owner.MovesetManager.Sound.Scripts.ContainsKey(crc))
            {
                richTextBox1.Text = ACMDDecompiler.DecompileCommands((ACMDScript)Owner.MovesetManager.Sound.Scripts[crc]);
                changed           = true;
            }
            if (cb_section.Text.Equals("EXPRESSION") && Owner.MovesetManager.Expression.Scripts.ContainsKey(crc))
            {
                richTextBox1.Text = ACMDDecompiler.DecompileCommands((ACMDScript)Owner.MovesetManager.Expression.Scripts[crc]);
                changed           = true;
            }
            if (cb_section.Text.Equals("EFFECT") && Owner.MovesetManager.Effect.Scripts.ContainsKey(crc))
            {
                richTextBox1.Text = ACMDDecompiler.DecompileCommands((ACMDScript)Owner.MovesetManager.Effect.Scripts[crc]);
                changed           = true;
            }
            if (changed)
            {
                set      = true;
                this.crc = crc;

                //HighlightSyntax();
            }
            ignoreTextChangedEvent = false;
        }
示例#3
0
 public void SetAnimation(uint crc)
 {
     set      = true;
     this.crc = crc;
     richTextBox1.Clear();
     if (cb_section.Text.Equals("GAME"))
     {
         richTextBox1.Text = ACMDDecompiler.Decompile((ACMDScript)Runtime.Moveset.Game.Scripts[crc]);
     }
     if (cb_section.Text.Equals("SOUND"))
     {
         richTextBox1.Text = ACMDDecompiler.Decompile((ACMDScript)Runtime.Moveset.Sound.Scripts[crc]);
     }
     if (cb_section.Text.Equals("EXPRESSION"))
     {
         richTextBox1.Text = ACMDDecompiler.Decompile((ACMDScript)Runtime.Moveset.Expression.Scripts[crc]);
     }
     if (cb_section.Text.Equals("EFFECT"))
     {
         richTextBox1.Text = ACMDDecompiler.Decompile((ACMDScript)Runtime.Moveset.Effect.Scripts[crc]);
     }
     //HighlightSyntax();
 }