예제 #1
0
        public void Unpatch(MethodInfo patch)
        {
            var obj = locker;

            lock (obj)
            {
                foreach (var methodBase in originals)
                {
                    var patchInfo = HarmonySharedState.GetPatchInfo(methodBase) ?? new PatchInfo();
                    PatchFunctions.RemovePatch(patchInfo, patch);
                    PatchFunctions.UpdateWrapper(methodBase, patchInfo, instance.Id);
                    HarmonySharedState.UpdatePatchInfo(methodBase, patchInfo);
                }
            }
        }
예제 #2
0
        public void Unpatch(MethodInfo patch)
        {
            lock (locker)
            {
                foreach (var original in originals)
                {
                    var patchInfo = HarmonySharedState.GetPatchInfo(original);
                    if (patchInfo == null)
                    {
                        patchInfo = new PatchInfo();
                    }

                    PatchFunctions.RemovePatch(patchInfo, patch);
                    PatchHandler.Get(original).Apply();
                }
            }
        }
예제 #3
0
        public void Unpatch(MethodInfo patch)
        {
            lock (locker)
            {
                foreach (var original in originals)
                {
                    var patchInfo = HarmonySharedState.GetPatchInfo(original);
                    if (patchInfo == null)
                    {
                        patchInfo = new PatchInfo();
                    }

                    PatchFunctions.RemovePatch(patchInfo, patch);
                    PatchFunctions.UpdateWrapper(original, patchInfo, instance.Id);

                    HarmonySharedState.UpdatePatchInfo(original, patchInfo);
                }
            }
        }