mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
fix some playlist starter loot, cleanup some code, fix death bugs on 1.8 and 1.7.2, fix reloading not taking items on 1.8 and 1.7.2, fix looting on s9, fix some s15 & s16 builds, fix bug with higher version looting
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
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)
|
|
};
|
|
|
|
template <typename StructType = uint8>
|
|
struct RowNameAndRowData
|
|
{
|
|
FName RowName;
|
|
StructType* RowData;
|
|
}; |