Browse Source

Updated Mono.Cecil

pull/1/head
Anairkoen Schno 6 years ago
parent
commit
efcaba6bde
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")
cctor = m;
var cbs = unityModDef.Import(((Action)CreateBootstrapper).Method);
var cbs = unityModDef.ImportReference(((Action)CreateBootstrapper).Method);
if (cctor == null)
{


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

@ -97,7 +97,10 @@
<Version>1.9.1.8</Version>
</PackageReference>
<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 Include="Newtonsoft.Json">
<Version>11.0.2</Version>


+ 3
- 4
IPA/IPA.csproj View File

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


Loading…
Cancel
Save