@@ -62,18 +62,17 @@ public override bool WillProcess(ICompiledAssembly compiledAssembly)
6262 )
6363 ) ;
6464 attr_AttributeUsage . ConstructorArguments . Add (
65- new CustomAttributeArgument ( assemblyDefinition . MainModule . ImportReference ( typeof ( AttributeTargets ) ) , 1 )
65+ new CustomAttributeArgument ( assemblyDefinition . MainModule . ImportReference ( typeof ( AttributeTargets ) ) , 2 )
6666 ) ;
6767 cls_NetcodePatchedAttribute . CustomAttributes . Add ( attr_AttributeUsage ) ;
6868
6969 // Method : NetcodePatchedAttribute.ctor
7070 var ctor_NetcodePatchedAttribute = new MethodDefinition (
7171 ".ctor" ,
72- MethodAttributes . Assembly | MethodAttributes . RTSpecialName | MethodAttributes . SpecialName |
73- MethodAttributes . HideBySig , assemblyDefinition . MainModule . TypeSystem . Void
72+ MethodAttributes . Public | MethodAttributes . RTSpecialName | MethodAttributes . SpecialName | MethodAttributes . HideBySig ,
73+ assemblyDefinition . MainModule . TypeSystem . Void
7474 ) ;
7575 cls_NetcodePatchedAttribute . Methods . Add ( ctor_NetcodePatchedAttribute ) ;
76- ctor_NetcodePatchedAttribute . Body . InitLocals = true ;
7776 var il_ctor_NetcodePatchedAttribute = ctor_NetcodePatchedAttribute . Body . GetILProcessor ( ) ;
7877 il_ctor_NetcodePatchedAttribute . Emit ( OpCodes . Ldarg_0 ) ;
7978 il_ctor_NetcodePatchedAttribute . Emit (
@@ -88,7 +87,7 @@ public override bool WillProcess(ICompiledAssembly compiledAssembly)
8887 var attribute = new CustomAttribute (
8988 assemblyDefinition . MainModule . ImportReference ( TypeHelpers . DefaultCtorFor ( cls_NetcodePatchedAttribute ) )
9089 ) ;
91- assemblyDefinition . CustomAttributes . Add ( attribute ) ;
90+ assemblyDefinition . MainModule . CustomAttributes . Add ( attribute ) ;
9291
9392 // write
9493 var pe = new MemoryStream ( ) ;
0 commit comments