i broke the whole project but its fine

complete pickup rewrite, idle pawns
This commit is contained in:
Milxnor
2023-05-07 17:34:24 -04:00
parent 5e92f2e90b
commit 3405177d20
51 changed files with 1439 additions and 338 deletions

View File

@@ -3,6 +3,8 @@
#include "Object.h"
#include "addresses.h"
#include "UnrealString.h"
#include "Map.h"
struct UField : UObject
{
@@ -28,3 +30,24 @@ class UFunction : public UStruct
public:
void*& GetFunc() { return *(void**)(__int64(this) + Offsets::Func); }
};
class UEnum : public UField
{
public:
int64 GetValue(const std::string& EnumMemberName)
{
auto Names = (TArray<TPair<FName, __int64>>*)(__int64(this) + sizeof(UField) + sizeof(FString));
for (int i = 0; i < Names->Num(); i++)
{
auto& Pair = Names->At(i);
auto& Name = Pair.Key();
auto Value = Pair.Value();
if (Name.ComparisonIndex.Value && Name.ToString().contains(EnumMemberName))
return Value;
}
return -1;
}
};