mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 19:02:21 +01:00
30 lines
1022 B
C++
30 lines
1022 B
C++
#pragma once
|
|
|
|
#include "Object.h"
|
|
|
|
#include "Map.h"
|
|
|
|
class UDataTable : public UObject
|
|
{
|
|
public:
|
|
template <typename RowDataType = uint8_t>
|
|
TMap<FName, RowDataType*>& GetRowMap()
|
|
{
|
|
static auto RowStructOffset = FindOffsetStruct("/Script/Engine.DataTable", "RowStruct");
|
|
|
|
return *(TMap<FName, RowDataType*>*)(__int64(this) + (RowStructOffset + sizeof(UObject*))); // because after rowstruct is rowmap
|
|
}
|
|
|
|
static UClass* StaticClass()
|
|
{
|
|
static auto Class = FindObject<UClass>("/Script/Engine.DataTable");
|
|
return Class;
|
|
}
|
|
};
|
|
|
|
struct FDataTableRowHandle
|
|
{
|
|
UDataTable* DataTable; // 0x0000(0x0008) (Edit, BlueprintVisible, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
|
FName RowName; // 0x0008(0x0008) (Edit, BlueprintVisible, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
|
};
|