spectacular

fix s16+ no reserve (again), fix ltm crash on loot (again), fix s3-s6 respawning
This commit is contained in:
Milxnor
2023-05-12 19:03:57 -04:00
parent 8013f43a8b
commit 2335ad43a3
7 changed files with 126 additions and 105 deletions

View File

@@ -16,14 +16,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))
{