Ejemplo n.º 1
0
        public override void Apply(Kanojo Kanojo)
        {
            var  types     = Kanojo.AssemblyCSharp.Find("AnimationManager", true);
            var  update    = types.FindMethod("Update");
            bool completed = false;
            var  body      = update.Body;
            var  index     = 0;

            foreach (var ins in body.Instructions)
            {
                if (ins.OpCode == OpCodes.Ldc_R4)
                {
                    try
                    {
                        ins.Operand = (float)Sys[index];
                        index++;
                    }
                    catch
                    {
                        break;
                    }
                }
            }
            completed = true;
            Console.WriteLine("Movement Time Delay Patch success: " + completed);
        }
Ejemplo n.º 2
0
        public override void Apply(Kanojo Kanojo)
        {
            var  types     = Kanojo.AssemblyCSharp.Find("GameManager", true);
            var  start     = types.FindMethod("Start");
            var  body      = start.Body;
            bool completed = false;

            foreach (var ins in body.Instructions)
            {
                if (ins.OpCode == OpCodes.Ldc_I4_S)
                {
                    ins.Operand = (sbyte)FPS;
                    completed   = true;
                    Console.WriteLine("Patched Operand as " + ins.Operand);
                }
            }
            Console.WriteLine("FPS Patch success: " + completed);
        }