should have been with last commit

This commit is contained in:
CWX 2024-11-02 17:04:38 +00:00
parent 86a922327c
commit d0790a0c8f
3 changed files with 59 additions and 6 deletions

View File

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

View File

@ -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;
}
}
}

View File

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