Browse Source

Updated Mono.Cecil

pull/46/head
Anairkoen Schno 6 years ago
parent
commit
5904e6c3cf
4 changed files with 9 additions and 7 deletions
  1. +1
    -1
      IPA.Injector/Injector.cs
  2. +4
    -1
      IPA.Loader/IPA.Loader.csproj
  3. +3
    -4
      IPA/IPA.csproj
  4. +1
    -1
      IPA/Patcher/Patcher.cs

+ 1
- 1
IPA.Injector/Injector.cs View File

@ -81,7 +81,7 @@ namespace IPA.Injector
if (m.IsRuntimeSpecialName && m.Name == ".cctor") if (m.IsRuntimeSpecialName && m.Name == ".cctor")
cctor = m; cctor = m;
var cbs = unityModDef.Import(((Action)CreateBootstrapper).Method);
var cbs = unityModDef.ImportReference(((Action)CreateBootstrapper).Method);
if (cctor == null) if (cctor == null)
{ {


+ 4
- 1
IPA.Loader/IPA.Loader.csproj View File

@ -97,7 +97,10 @@
<Version>1.9.1.8</Version> <Version>1.9.1.8</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Mono.Cecil"> <PackageReference Include="Mono.Cecil">
<Version>0.9.6.4</Version>
<Version>0.10.1</Version>
</PackageReference>
<PackageReference Include="Mono.Unofficial.pdb2mdb">
<Version>4.2.3.4</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Newtonsoft.Json"> <PackageReference Include="Newtonsoft.Json">
<Version>11.0.2</Version> <Version>11.0.2</Version>


+ 3
- 4
IPA/IPA.csproj View File

@ -93,6 +93,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="IPA\Fallback\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Arguments.cs" /> <Compile Include="Arguments.cs" />
@ -111,12 +112,10 @@
<ItemGroup> <ItemGroup>
<Content Include="favicon.ico" /> <Content Include="favicon.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="IPA\Fallback\" />
</ItemGroup>
<ItemGroup />
<ItemGroup> <ItemGroup>
<PackageReference Include="Mono.Cecil"> <PackageReference Include="Mono.Cecil">
<Version>0.9.6.4</Version>
<Version>0.10.1</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>


+ 1
- 1
IPA/Patcher/Patcher.cs View File

@ -118,7 +118,7 @@ namespace IPA.Patcher
var targetMethod = targetType.Methods.FirstOrDefault(m => m.IsConstructor && m.IsStatic); var targetMethod = targetType.Methods.FirstOrDefault(m => m.IsConstructor && m.IsStatic);
if (targetMethod != null) if (targetMethod != null)
{ {
var methodReference = _module.Import(injector.GetType("IPA.Injector.Injector").Methods.First(m => m.Name == "Inject"));
var methodReference = _module.ImportReference(injector.GetType("IPA.Injector.Injector").Methods.First(m => m.Name == "Inject"));
targetMethod.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Call, methodReference)); targetMethod.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Call, methodReference));
return true; return true;
} }


Loading…
Cancel
Save