mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
add skunyk siphon
This commit is contained in:
@@ -45,6 +45,43 @@ void* UObject::GetProperty(const std::string& ChildName, bool bWarnIfNotFound) c
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
void* UObject::GetPropertyFunc(const std::string& ChildName, bool bWarnIfNotFound)
|
||||
{
|
||||
auto Func = (UFunction*)this;
|
||||
void* Property = *(void**)(__int64(Func) + Offsets::Children);
|
||||
|
||||
if (Property)
|
||||
{
|
||||
// LOG_INFO(LogDev, "Reading prop name..");
|
||||
|
||||
std::string PropName = GetFNameOfProp(Property)->ToString();
|
||||
|
||||
// LOG_INFO(LogDev, "PropName: {}", PropName);
|
||||
|
||||
if (PropName == ChildName)
|
||||
{
|
||||
return Property;
|
||||
}
|
||||
|
||||
while (Property)
|
||||
{
|
||||
if (PropName == ChildName)
|
||||
{
|
||||
return Property;
|
||||
}
|
||||
|
||||
Property = GetNext(Property);
|
||||
PropName = Property ? GetFNameOfProp(Property)->ToString() : "";
|
||||
}
|
||||
}
|
||||
|
||||
if (bWarnIfNotFound)
|
||||
LOG_WARN(LogFinder, "Unable to find3{}", ChildName);
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* UObject::GetProperty(const std::string& ChildName, bool bWarnIfNotFound)
|
||||
{
|
||||
for (auto CurrentClass = ClassPrivate; CurrentClass; CurrentClass = *(UClass**)(__int64(CurrentClass) + Offsets::SuperStruct))
|
||||
@@ -90,7 +127,7 @@ int UObject::GetOffset(const std::string& ChildName, bool bWarnIfNotFound)
|
||||
if (!Property)
|
||||
return -1;
|
||||
|
||||
return *(int*)(__int64(Property) + Offsets::Offset_Internal);
|
||||
return *(int*)(__int64(Property) + Offsets::Offset_Internal);
|
||||
}
|
||||
|
||||
int UObject::GetOffset(const std::string& ChildName, bool bWarnIfNotFound) const
|
||||
@@ -103,6 +140,16 @@ int UObject::GetOffset(const std::string& ChildName, bool bWarnIfNotFound) const
|
||||
return *(int*)(__int64(Property) + Offsets::Offset_Internal);
|
||||
}
|
||||
|
||||
int UObject::GetOffsetFunc(const std::string& ChildName, bool bWarnIfNotFound)
|
||||
{
|
||||
auto Property = GetPropertyFunc(ChildName, bWarnIfNotFound);
|
||||
|
||||
if (!Property)
|
||||
return -1;
|
||||
|
||||
return *(int*)(__int64(Property) + Offsets::Offset_Internal);
|
||||
}
|
||||
|
||||
void* UObject::GetInterfaceAddress(UClass* InterfaceClass)
|
||||
{
|
||||
static void* (*GetInterfaceAddressOriginal)(UObject* a1, UClass* a2) = decltype(GetInterfaceAddressOriginal)(Addresses::GetInterfaceAddress);
|
||||
|
||||
Reference in New Issue
Block a user