mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
i broke the whole project but its fine
complete pickup rewrite, idle pawns
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user