mirror of
https://github.com/sp-tarkov/assembly-tool.git
synced 2025-02-13 05:30:44 -05:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
817fe28c1e
@ -2684,18 +2684,25 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"NewTypeName": "DamageInfo",
|
||||
"OriginalTypeName": "GStruct394",
|
||||
"NewTypeName": "DamageInfoStruct",
|
||||
"OriginalTypeName": "GStruct421",
|
||||
"UseForceRename": false,
|
||||
"SearchParams": {
|
||||
"IsPublic": true,
|
||||
"IncludeMethods": [],
|
||||
"ExcludeMethods": [],
|
||||
"IncludeFields": [
|
||||
"OverDamageFrom"
|
||||
"OverDamageFrom",
|
||||
"Player",
|
||||
"BodyPartColliderType",
|
||||
"HittedBallisticColliders"
|
||||
],
|
||||
"ExcludeFields": [],
|
||||
"IncludeProperties": [],
|
||||
"IncludeProperties": [
|
||||
"Penetrated",
|
||||
"HaveOwner",
|
||||
"Blunt"
|
||||
],
|
||||
"ExcludeProperties": [],
|
||||
"IncludeNestedTypes": [],
|
||||
"ExcludeNestedTypes": []
|
||||
@ -5278,25 +5285,25 @@
|
||||
"ExcludeNestedTypes": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"NewTypeName": "SwapOperationClass",
|
||||
"OriginalTypeName": "GClass3090",
|
||||
"UseForceRename": false,
|
||||
"SearchParams": {
|
||||
"IsPublic": true,
|
||||
"ConstructorParameterCount": 7,
|
||||
"IncludeMethods": [],
|
||||
"ExcludeMethods": [],
|
||||
"IncludeFields": [],
|
||||
"ExcludeFields": [],
|
||||
"IncludeProperties": [
|
||||
"DestroysMainItem"
|
||||
],
|
||||
"ExcludeProperties": [],
|
||||
"IncludeNestedTypes": [],
|
||||
"ExcludeNestedTypes": []
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "NewTypeName": "SwapOperationClass",
|
||||
// "OriginalTypeName": "GClass3090",
|
||||
// "UseForceRename": false,
|
||||
// "SearchParams": {
|
||||
// "IsPublic": true,
|
||||
// "ConstructorParameterCount": 7,
|
||||
// "IncludeMethods": [],
|
||||
// "ExcludeMethods": [],
|
||||
// "IncludeFields": [],
|
||||
// "ExcludeFields": [],
|
||||
// "IncludeProperties": [
|
||||
// "DestroysMainItem"
|
||||
// ],
|
||||
// "ExcludeProperties": [],
|
||||
// "IncludeNestedTypes": [],
|
||||
// "ExcludeNestedTypes": []
|
||||
// }
|
||||
// },
|
||||
{
|
||||
"NewTypeName": "ThrowOperationClass",
|
||||
"OriginalTypeName": "GClass3091",
|
||||
@ -6310,17 +6317,21 @@
|
||||
},
|
||||
{
|
||||
"NewTypeName": "TimeHasComeScreenClass",
|
||||
"OriginalTypeName": "GClass3436",
|
||||
"OriginalTypeName": "GClass3563",
|
||||
"UseForceRename": false,
|
||||
"SearchParams": {
|
||||
"ConstructorParameterCount": 3,
|
||||
"IsPublic": true,
|
||||
"IsNested": true,
|
||||
"IsSealed": true,
|
||||
"IsSealed": false,
|
||||
"NTParentName": "MatchmakerTimeHasCome",
|
||||
"IncludeMethods": [],
|
||||
"ExcludeMethods": [],
|
||||
"IncludeFields": [
|
||||
"SearchingForServer"
|
||||
"ScreenType",
|
||||
"IsReconnecting",
|
||||
"SwitchTaskBarButtonsAvailability",
|
||||
"LimitedServersAvailability"
|
||||
],
|
||||
"ExcludeFields": [],
|
||||
"IncludeProperties": [],
|
||||
@ -7667,7 +7678,8 @@
|
||||
"FieldCount": 1,
|
||||
"IncludeMethods": [
|
||||
"Enter",
|
||||
"Exit"
|
||||
"Exit",
|
||||
"ManualAnimatorMoveUpdate"
|
||||
],
|
||||
"ExcludeMethods": [
|
||||
"ProcessAnimatorMovement",
|
||||
|
@ -35,5 +35,9 @@
|
||||
{"Role":"followerKojaniy","Limit":2,"Difficulty":"normal"},
|
||||
{"Role":"skier","Limit":2,"Difficulty":"normal"},
|
||||
{"Role":"peacemaker","Limit":2,"Difficulty":"normal"},
|
||||
{"Role":"bossPartisan","Limit":2,"Difficulty":"normal"}
|
||||
{"Role":"infectedAssault","Limit":2,"Difficulty":"normal"},
|
||||
{"Role":"infectedPmc","Limit":2,"Difficulty":"normal"},
|
||||
{"Role":"infectedCivil","Limit":2,"Difficulty":"normal"},
|
||||
{"Role":"infectedLaborant","Limit":2,"Difficulty":"normal"},
|
||||
{"Role":"infectedTagilla","Limit":2,"Difficulty":"normal"}
|
||||
]
|
@ -168,7 +168,7 @@ namespace DumpLib
|
||||
// get End raid class from json
|
||||
DataHelper.EndRaidClass = DataHelper.GetEndRaidClass();
|
||||
// get player profile
|
||||
DataHelper.PlayerProfile = ReflectionHelper.GetPlayerProfile();
|
||||
DataHelper.PlayerProfile = ReflectionHelper.GetProfileCompleteData();
|
||||
// Set up end raid class
|
||||
DataHelper.EndRaidClass.GetType().GetField("profile").SetValue(DataHelper.EndRaidClass, DataHelper.PlayerProfile);
|
||||
|
||||
|
@ -32,7 +32,7 @@ public class MethodHelper
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method to get Quit method from EFT (as of 20/05/2024 - GClass1955)
|
||||
/// Method to get Quit method from EFT (as of 02/11/2024 - GClass2193)
|
||||
/// </summary>
|
||||
/// <returns>MethodInfo</returns>
|
||||
public static MethodInfo GetApplicationQuitMethod()
|
||||
@ -40,8 +40,11 @@ public class MethodHelper
|
||||
try
|
||||
{
|
||||
return DataHelper._eftAssembly.GetTypes().First(x =>
|
||||
x.GetMethods().Any(y =>
|
||||
y.Name == "Quit")
|
||||
{
|
||||
var methods = x.GetMethods();
|
||||
|
||||
return methods.Any(m => m.Name == "Quit") && methods.Any(m => m.Name == "QuitWithCode");
|
||||
}
|
||||
).GetMethod("Quit");
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -220,6 +220,9 @@ namespace DumpLib.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// DONT USE ANYMORE, USE GETPROFILECOMPLETEDATA()
|
||||
/// </summary>
|
||||
public static object GetPlayerProfile()
|
||||
{
|
||||
try
|
||||
@ -235,5 +238,47 @@ namespace DumpLib.Helpers
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TODO: Rename as its not an actual shim
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static object GetProfileShim()
|
||||
{
|
||||
try
|
||||
{
|
||||
var typeToUse = TypeHelper.GetProfileShimType();
|
||||
var instance = Activator.CreateInstance(typeToUse,
|
||||
new object[]
|
||||
{
|
||||
DataHelper.Session.GetType().GetProperty("Profile").GetValue(DataHelper.Session),
|
||||
TypeHelper.GetProfileSearchControllerType().GetField("Instance").GetValue(null)
|
||||
});
|
||||
return instance;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Utils.LogError("GetProfileShim");
|
||||
Utils.LogError(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public static object GetProfileCompleteData()
|
||||
{
|
||||
try
|
||||
{
|
||||
var completeData = ReflectionHelper.GetProfileShim();
|
||||
var converterMethod = CreateGenericMethod(MethodHelper.GetToUnparsedDataMethod(), TypeHelper.GetProfileShimType());
|
||||
return converterMethod.Invoke(null, new[] { completeData, Array.Empty<JsonConverter>() });
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Utils.LogError("GetProfileCompleteData");
|
||||
Utils.LogError(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -222,11 +222,11 @@ public static class TypeHelper
|
||||
{
|
||||
var fields = x.GetFields();
|
||||
var methods = x.GetMethods();
|
||||
|
||||
return fields.Length == 6 &&
|
||||
fields.Any(f => f.Name == "location") &&
|
||||
|
||||
return fields.Length == 6 &&
|
||||
fields.Any(f => f.Name == "location") &&
|
||||
fields.Any(f => f.Name == "_id") &&
|
||||
methods.Any(m => m.Name == "Clone") &&
|
||||
methods.Any(m => m.Name == "Clone") &&
|
||||
methods.Any(m => m.Name == "ToString");
|
||||
});
|
||||
}
|
||||
@ -253,4 +253,56 @@ public static class TypeHelper
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public static Type GetProfileShimType()
|
||||
{
|
||||
try
|
||||
{
|
||||
return DataHelper._eftAssembly.GetTypes().First(x =>
|
||||
{
|
||||
var fields = x.GetFields();
|
||||
var constructors = x.GetConstructors();
|
||||
var properties = x.GetProperties();
|
||||
var methods = x.GetMethods();
|
||||
|
||||
return fields.Length == 25 && constructors.Length == 2 &&
|
||||
properties.Length == 0 && methods.Length == 4 &&
|
||||
fields.Any(f => f.Name == "KarmaValue") &&
|
||||
fields.Any(f => f.Name == "Encyclopedia") &&
|
||||
fields.Any(f => f.Name == "Id") &&
|
||||
fields.Any(f => f.Name == "AccountId") &&
|
||||
fields.Any(f => f.Name == "PetId") &&
|
||||
fields.Any(f => f.Name == "Customization");
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Utils.LogError("GetProfileShimType");
|
||||
Utils.LogError(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public static Type GetProfileSearchControllerType()
|
||||
{
|
||||
try
|
||||
{
|
||||
return DataHelper._eftAssembly.GetTypes().First(x =>
|
||||
{
|
||||
var fields = x.GetFields();
|
||||
var methods = x.GetMethods();
|
||||
|
||||
return fields.Length == 1 && methods.Length == 17 &&
|
||||
!x.IsInterface && methods.Any(m => m.Name == "IsItemKnown") &&
|
||||
methods.Any(m => m.Name == "TryFindChangedContainer") &&
|
||||
methods.Any(m => m.Name == "GetObserverItemState");
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Utils.LogError("GetProfileSearchControllerType");
|
||||
Utils.LogError(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
@ -222,7 +222,8 @@ public class DumperClass
|
||||
var firstMethod = methods.FirstOrDefault(m => m.Parameters.Any(p => p.Name == "certificate"));
|
||||
var secondMethod = methods.FirstOrDefault(m => m.Parameters.Any(p => p.Name == "certificateData"));
|
||||
|
||||
if (firstMethod?.Body.Instructions.Count != 55 || secondMethod?.Body.Instructions.Count != 14)
|
||||
// as of 01/11/24 firstMethod returns true, so its now only 2 instructions, was 55 (this may change, BSG have byppassed their own SSL checks atm)
|
||||
if (firstMethod?.Body.Instructions.Count != 2 || secondMethod?.Body.Instructions.Count != 14)
|
||||
{
|
||||
Logger.Log($"Instruction count has changed, method with 'certificate' as a param - before: 51, now: {firstMethod.Body.Instructions.Count}, " +
|
||||
$"method with 'certificateData' as a param - before: 14, now: {secondMethod.Body.Instructions.Count}", ConsoleColor.Red);
|
||||
|
Loading…
x
Reference in New Issue
Block a user