2023-03-03 18:52:31 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using Mono.Cecil;
|
|
|
|
|
|
|
|
namespace Aki.PrePatch
|
|
|
|
{
|
|
|
|
public static class AkiBotsPrePatcher
|
|
|
|
{
|
|
|
|
public static IEnumerable<string> TargetDLLs { get; } = new[] { "Assembly-CSharp.dll" };
|
|
|
|
|
2023-10-28 09:30:21 +00:00
|
|
|
public static int sptUsecValue = 41;
|
|
|
|
public static int sptBearValue = 42;
|
2023-03-03 18:52:31 +00:00
|
|
|
|
|
|
|
public static void Patch(ref AssemblyDefinition assembly)
|
|
|
|
{
|
|
|
|
var botEnums = assembly.MainModule.GetType("EFT.WildSpawnType");
|
|
|
|
|
|
|
|
var sptUsec = new FieldDefinition("sptUsec",
|
|
|
|
FieldAttributes.Public | FieldAttributes.Static | FieldAttributes.Literal | FieldAttributes.HasDefault,
|
|
|
|
botEnums)
|
|
|
|
{ Constant = sptUsecValue };
|
|
|
|
|
|
|
|
var sptBear = new FieldDefinition("sptBear",
|
|
|
|
FieldAttributes.Public | FieldAttributes.Static | FieldAttributes.Literal | FieldAttributes.HasDefault,
|
|
|
|
botEnums)
|
|
|
|
{ Constant = sptBearValue };
|
|
|
|
|
|
|
|
botEnums.Fields.Add(sptUsec);
|
|
|
|
botEnums.Fields.Add(sptBear);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|