From 07900a46cfb0dc01ecbdc03916063b15098f3395 Mon Sep 17 00:00:00 2001 From: CWX Date: Sat, 2 Nov 2024 17:03:45 +0000 Subject: [PATCH 1/5] Update BotData --- DumpLib/DUMPDATA/botReqData.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DumpLib/DUMPDATA/botReqData.json b/DumpLib/DUMPDATA/botReqData.json index d889856..0d4a990 100644 --- a/DumpLib/DUMPDATA/botReqData.json +++ b/DumpLib/DUMPDATA/botReqData.json @@ -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"} ] \ No newline at end of file From bb2c43e9ec0a903d3416bf19c5f6863824d55462 Mon Sep 17 00:00:00 2001 From: CWX Date: Sat, 2 Nov 2024 17:03:54 +0000 Subject: [PATCH 2/5] Update Quit Method --- DumpLib/Helpers/MethodHelper.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/DumpLib/Helpers/MethodHelper.cs b/DumpLib/Helpers/MethodHelper.cs index 657492e..71e29e5 100644 --- a/DumpLib/Helpers/MethodHelper.cs +++ b/DumpLib/Helpers/MethodHelper.cs @@ -32,7 +32,7 @@ public class MethodHelper } /// - /// 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) /// /// MethodInfo 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) From 86a922327c42d940da132b5d3faae8797c235e94 Mon Sep 17 00:00:00 2001 From: CWX Date: Sat, 2 Nov 2024 17:04:10 +0000 Subject: [PATCH 3/5] Add Additional changes needed for new patch --- DumpLib/Helpers/ReflectionHelper.cs | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/DumpLib/Helpers/ReflectionHelper.cs b/DumpLib/Helpers/ReflectionHelper.cs index 1a449ba..08c9420 100644 --- a/DumpLib/Helpers/ReflectionHelper.cs +++ b/DumpLib/Helpers/ReflectionHelper.cs @@ -220,6 +220,9 @@ namespace DumpLib.Helpers } } + /// + /// DONT USE ANYMORE, USE GETPROFILECOMPLETEDATA() + /// public static object GetPlayerProfile() { try @@ -235,5 +238,47 @@ namespace DumpLib.Helpers throw; } } + + /// + /// TODO: Rename as its not an actual shim + /// + /// + /// + 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() }); + } + catch (Exception e) + { + Utils.LogError("GetProfileCompleteData"); + Utils.LogError(e); + throw; + } + } } } \ No newline at end of file From d0790a0c8f66ada396ca6b4a8a8d6781692b8018 Mon Sep 17 00:00:00 2001 From: CWX Date: Sat, 2 Nov 2024 17:04:38 +0000 Subject: [PATCH 4/5] should have been with last commit --- DumpLib/DumpyTool.cs | 2 +- DumpLib/Helpers/TypeHelper.cs | 60 ++++++++++++++++++++++++++++--- RecodeItLib/Dumper/DumperClass.cs | 3 +- 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/DumpLib/DumpyTool.cs b/DumpLib/DumpyTool.cs index 94700c4..279de51 100644 --- a/DumpLib/DumpyTool.cs +++ b/DumpLib/DumpyTool.cs @@ -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); diff --git a/DumpLib/Helpers/TypeHelper.cs b/DumpLib/Helpers/TypeHelper.cs index f34f535..1da2a5d 100644 --- a/DumpLib/Helpers/TypeHelper.cs +++ b/DumpLib/Helpers/TypeHelper.cs @@ -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; + } + } } \ No newline at end of file diff --git a/RecodeItLib/Dumper/DumperClass.cs b/RecodeItLib/Dumper/DumperClass.cs index 9d63822..33e5a55 100644 --- a/RecodeItLib/Dumper/DumperClass.cs +++ b/RecodeItLib/Dumper/DumperClass.cs @@ -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); From 15ef52318942fcc04b7fcbf01772bc3b92f63a57 Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 2 Nov 2024 17:10:11 +0000 Subject: [PATCH 5/5] Updated mappings --- Assets/mappings.jsonc | 66 +++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/Assets/mappings.jsonc b/Assets/mappings.jsonc index 741b248..1657640 100644 --- a/Assets/mappings.jsonc +++ b/Assets/mappings.jsonc @@ -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",