public Il2CppTypeDefinition GetTypeDefinitionFromIl2CppType(Il2CppType il2CppType)
 {
     if (il2Cpp.Version >= 27 && il2Cpp.IsDumped)
     {
         var offset = il2CppType.data.typeHandle - metadata.ImageBase - metadata.header.typeDefinitionsOffset;
         var index  = offset / (ulong)metadata.SizeOf(typeof(Il2CppTypeDefinition));
         return(metadata.typeDefs[index]);
     }
     else
     {
         return(metadata.typeDefs[il2CppType.data.klassIndex]);
     }
 }
示例#2
0
 public Il2CppTypeDefinition GetTypeDefinitionFromIl2CppType(Il2CppType il2CppType)
 {
     if (il2Cpp.Version >= 27 && il2Cpp is ElfBase elf && elf.IsDumped)
     {
         var offset = il2CppType.data.typeHandle - metadata.Address - metadata.header.typeDefinitionsOffset;
         var index  = offset / (ulong)metadata.SizeOf(typeof(Il2CppTypeDefinition));
         return(metadata.typeDefs[index]);
     }