diff --git a/Project Reboot 3.0/FortLootPackage.cpp b/Project Reboot 3.0/FortLootPackage.cpp index 4537a14..1e1e475 100644 --- a/Project Reboot 3.0/FortLootPackage.cpp +++ b/Project Reboot 3.0/FortLootPackage.cpp @@ -153,30 +153,27 @@ float GetAmountOfLootPackagesToDrop(FFortLootTierData* LootTierData, int Origina FFortLootTierData* PickLootTierData(const std::vector& LTDTables, FName LootTierGroup, int ForcedLootTier = -1, FName* OutRowName = nullptr) // Fortnite returns the row name and then finds the tier data again, but I really don't see the point of this. { - // This like isn't right, at all. - float LootTier = ForcedLootTier; + float IdkForcedWeightorsomething = 1; if (LootTier == -1) { - // LootTier = ?? + // IdkForcedWeightorsomething = weightofAlltherowsithink // we don't ened to do this since the pickweightedeleent already does that } else { - // buncha code im too lazy to reverse + // ITS SO MUCH TO REVERSE AAAAA } // if (fabs(LootTier) <= 0.0000000099999999) // return 0; - int Multiplier = LootTier == -1 ? 1 : LootTier; // Idk i think we need to fill out the code above for this to work properly maybe - LOOTING_MAP_TYPE TierGroupLTDs; CollectDataTablesRows(LTDTables, &TierGroupLTDs, [&](FName RowName, FFortLootTierData* TierData) -> bool { if (LootTierGroup == TierData->GetTierGroup()) { - if ((LootTier == -1 ? true : LootTier == TierData->GetLootTier())) + if ((LootTier == -1 ? true : LootTier == TierData->GetLootTier())) // idek if this is proper { return true; } @@ -189,7 +186,7 @@ FFortLootTierData* PickLootTierData(const std::vector& LTDTables, F FFortLootTierData* ChosenRowLootTierData = PickWeightedElement(TierGroupLTDs, [](FFortLootTierData* LootTierData) -> float { return LootTierData->GetWeight(); }, RandomFloatForLoot, -1, - true, Multiplier, OutRowName); + true, 1, OutRowName, false, false, IdkForcedWeightorsomething); return ChosenRowLootTierData; } diff --git a/Project Reboot 3.0/FortLootPackage.h b/Project Reboot 3.0/FortLootPackage.h index 1658600..5101444 100644 --- a/Project Reboot 3.0/FortLootPackage.h +++ b/Project Reboot 3.0/FortLootPackage.h @@ -144,7 +144,7 @@ template FORCEINLINE static ValueType PickWeightedElement(const std::map& Elements, std::function GetWeightFn, std::function RandomFloatGenerator = RandomFloatForLoot, - float TotalWeightParam = -1, bool bCheckIfWeightIsZero = false, int RandMultiplier = 1, KeyType* OutName = nullptr, bool bPrint = false, bool bKeepGoingUntilWeGetValue = false) + float TotalWeightParam = -1, bool bCheckIfWeightIsZero = false, int RandMultiplier = 1, KeyType* OutName = nullptr, bool bPrint = false, bool bKeepGoingUntilWeGetValue = false, float AHHH = 1) { float TotalWeight = TotalWeightParam; @@ -165,7 +165,7 @@ FORCEINLINE static ValueType PickWeightedElement(const std::map= 424 ? 2 : 3; // TODO: check this + NumToSubtractFromSquadId = Engine_Version >= 424 ? 2 : Engine_Version >= 423 ? 3 : 0; // TODO: check this NumElementsPerChunk = std::floor(Fortnite_Version) >= 5 && Fortnite_Version <= 6 ? 0x10400 : 0x10000; // Idk what version tbh Offsets::FindAll(); // We have to do this before because FindCantBuild uses FortAIController.CreateBuildingActor