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);