// Token: 0x0600035C RID: 860 RVA: 0x00010C94 File Offset: 0x0000EE94
 public void PoisonCall(EmergencyKit kit, TryDelegate dangerousCall)
 {
     PoisonControl.< > c__DisplayClass1 CS$ < > 8__locals1 = new PoisonControl.< > c__DisplayClass1();
     CS$ < > 8__locals1.kit         = kit;
     CS$ < > 8__locals1.< > 4__this = this;
     ILUtil.DoTryFilterCatch(dangerousCall, new FilterDelegate(CS$ < > 8__locals1, (UIntPtr)ldftn(< PoisonCall > b__0)), null);
 }
示例#2
0
 static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions, ILGenerator il)
 {
     if (instructions.ElementAt(84).opcode != OpCodes.Ldarg_0)
     {
         Plugin.Log.Warn("disableFakeWallBloom: StretchableObstacle.SetSizeAndColor:84 was not what I expected, not patching it");
     }
     else
     {
         ILUtil.DynamicPrefix(84, ref instructions, il, AccessTools.Method(typeof(WallFakeBloom), nameof(__DisableFakeBloomProcessing)));
     }
     return(instructions);
 }
 public bool TryExecute(TryDelegate task)
 {
     TransientExceptionHandler.< > c__DisplayClass1 CS$ < > 8__locals1 = new TransientExceptionHandler.< > c__DisplayClass1();
     CS$ < > 8__locals1.< > 4__this = this;
     ArgumentValidator.ThrowIfNull("task", task);
     CS$ < > 8__locals1.exception   = null;
     CS$ < > 8__locals1.needToRetry = false;
     ILUtil.DoTryFilterCatch(task, this.transientExceptionFilter, new CatchDelegate(CS$ < > 8__locals1, (UIntPtr)ldftn(< TryExecute > b__0)));
     if (!CS$ < > 8__locals1.needToRetry)
     {
         this.TransientExceptionCount = 0;
         this.tracer.TraceDebug((long)this.GetHashCode(), "TransientExceptionHandler.TryExecute: Task completed successfully and the retry count has beeen restarted.");
     }
示例#4
0
        static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions, ILGenerator il)
        {
            if (!ILUtil.CheckIL(instructions, new Dictionary <int, OpCode>()
            {
                { 90, OpCodes.Brtrue_S },
                { 93, OpCodes.Ldarg_0 },
                { 96, OpCodes.Callvirt },
                { 104, OpCodes.Stfld }
            }))
            {
                Plugin.Log.Warn("basegameFulltextSearch: BeatmapLevelFilterModel.FilerBeatmapLevelPackCollectionAsync was not what I expected, not patching it");
                isActive = false;
                return(instructions);
            }

            var conditional = new CodeInstruction[] {
                new CodeInstruction(OpCodes.Ldc_I4_1),
                new CodeInstruction(OpCodes.Newarr, typeof(string)),
                new CodeInstruction(OpCodes.Dup),
                new CodeInstruction(OpCodes.Ldc_I4_0)
            }.ToList();

            conditional.AddRange(instructions.ToList().GetRange(93, 4).Select(x => new CodeInstruction(x.opcode, x.operand)));

            conditional.AddRange(new CodeInstruction[] {
                new CodeInstruction(OpCodes.Stelem_Ref),

                new CodeInstruction(OpCodes.Br, ILUtil.GetLabelForIndex(104, instructions, il))
            });

            ILUtil.InsertConditionalIL(93, ref instructions, il, AccessTools.Method(typeof(BasegameSearchFulltext), nameof(__EnableFulltextSearch)), conditional);

            instructions.ElementAt(90).operand = ILUtil.GetLabelForIndex(93, instructions, il);

            return(instructions);
        }
示例#5
0
 static MethodBase TargetMethod() => ILUtil.GetIterator <BeatmapLevelFilterModel>("FilerBeatmapLevelPackCollectionAsync");