i gotta go to school bro

prevent some cheats, fix a crash on newer versions for looting, fix a bug on S16+ where with mcp you would get no reserve.
This commit is contained in:
Milxnor
2023-05-10 07:59:48 -04:00
parent 3fb5c4671d
commit f41be934eb
5 changed files with 120 additions and 27 deletions

View File

@@ -17,14 +17,19 @@ struct FFortGameFeatureLootTableData
#ifdef EXPERIMENTAL_LOOTING
template <typename RowStructType = uint8>
void CollectDataTablesRows(std::vector<UDataTable*> DataTables, std::map<FName, RowStructType*>* OutMap, std::function<bool(FName, RowStructType*)> Check = []() { return true; })
void CollectDataTablesRows(const std::vector<UDataTable*>& DataTables, std::map<FName, RowStructType*>* OutMap, std::function<bool(FName, RowStructType*)> Check = []() { return true; })
{
std::vector<UDataTable*> DataTablesToIterate;
static auto CompositeDataTableClass = FindObject<UClass>("/Script/Engine.CompositeDataTable");
static auto CompositeDataTableClass = FindObject<UClass>(L"/Script/Engine.CompositeDataTable");
for (auto DataTable : DataTables)
for (UDataTable* DataTable : DataTables)
{
if (!DataTable->IsValidLowLevel())
{
continue; // Remove from vector?
}
// if (auto CompositeDataTable = Cast<UCompositeDataTable>(DataTable))
if (DataTable->IsA(CompositeDataTableClass))
{