Skip to content

Commit c9b9eac

Browse files
committed
fix: Mod replace
1 parent 8f0f1bb commit c9b9eac

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/OTAPI.UnifiedServerProcess/ModAssemblyMerger.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -293,20 +293,16 @@ static void SetModTypePlaceholder(ModuleDefinition module, Dictionary<string, Ty
293293
existingMethod = null;
294294
}
295295
PrepareMethod(target, method, existingMethod);
296-
SetMemberReplace(module, method.CustomAttributes, false);
296+
if (!method.IsSpecialName) {
297+
SetMemberReplace(module, method.CustomAttributes, false);
298+
}
297299
}
298300
if (modType.IsEnum) {
299301
SetMemberReplace(module, modType.CustomAttributes, true);
300302
}
301303
foreach (var field in modType.Fields) {
302304
SetMemberReplace(module, field.CustomAttributes, modType.IsEnum);
303305
}
304-
foreach (var prop in modType.Properties) {
305-
SetMemberReplace(module, prop.CustomAttributes, false);
306-
}
307-
foreach (var ev in modType.Events) {
308-
SetMemberReplace(module, ev.CustomAttributes, false);
309-
}
310306
}
311307
foreach (var nested in modType.NestedTypes) {
312308
SetModTypePlaceholder(module, uspTypes, nested, target);

0 commit comments

Comments
 (0)