From 134bd42ade61482b3febc5736cb920c3010e5ceb Mon Sep 17 00:00:00 2001 From: Gray <84999745+Milxnor@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:18:39 -0400 Subject: [PATCH] fix loot spawn on 1.7.2 probably --- Project Reboot 3.0/BuildingContainer.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Project Reboot 3.0/BuildingContainer.h b/Project Reboot 3.0/BuildingContainer.h index 847251c..6246ba3 100644 --- a/Project Reboot 3.0/BuildingContainer.h +++ b/Project Reboot 3.0/BuildingContainer.h @@ -26,9 +26,17 @@ public: return this->ReadBitfieldValue(bAlreadySearchedOffset, bAlreadySearchedFieldMask); } - FVector& GetLootSpawnLocation_Athena() + FVector/*&*/ GetLootSpawnLocation_Athena() { - static auto LootSpawnLocation_AthenaOffset = this->GetOffset("LootSpawnLocation_Athena"); + static auto LootSpawnLocation_AthenaOffset = this->GetOffset("LootSpawnLocation_Athena", false); + + if (LootSpawnLocation_AthenaOffset == -1) + { + static auto LootSpawnLocationOffset = this->GetOffset("LootSpawnLocation", false); + // return this->Get(LootSpawnLocationOffset); + return FVector(); + } + return this->Get(LootSpawnLocation_AthenaOffset); }