Revert "a good update"

This reverts commit 3fb5c4671d.
This commit is contained in:
Milxnor
2023-05-12 17:51:43 -04:00
parent 07d42b42f2
commit 8470ac942a
34 changed files with 169 additions and 612 deletions

View File

@@ -7,8 +7,6 @@
bool ABuildingContainer::SpawnLoot(AFortPawn* Pawn)
{
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
FVector LocationToSpawnLoot = this->GetActorLocation() + this->GetActorRightVector() * 70.f + FVector{ 0, 0, 50 };
static auto SearchLootTierGroupOffset = this->GetOffset("SearchLootTierGroup");
@@ -16,16 +14,18 @@ bool ABuildingContainer::SpawnLoot(AFortPawn* Pawn)
// LOG_INFO(LogInteraction, "RedirectedLootTier: {}", RedirectedLootTier.ToString());
auto LootDrops = PickLootDrops(RedirectedLootTier, GameState->GetWorldLevel(), -1, bDebugPrintLooting);
auto LootDrops = PickLootDrops(RedirectedLootTier, -1, bDebugPrintLooting);
// LOG_INFO(LogInteraction, "LootDrops.size(): {}", LootDrops.size());
for (auto& LootDrop : LootDrops)
for (int i = 0; i < LootDrops.size(); i++)
{
auto& lootDrop = LootDrops.at(i);
PickupCreateData CreateData{};
CreateData.bToss = true;
// CreateData.PawnOwner = Pawn;
CreateData.ItemEntry = LootDrop.ItemEntry;
CreateData.ItemEntry = FFortItemEntry::MakeItemEntry(lootDrop->GetItemDefinition(), lootDrop->GetCount(), lootDrop->GetLoadedAmmo());
CreateData.SpawnLocation = LocationToSpawnLoot;
CreateData.SourceType = EFortPickupSourceTypeFlag::GetContainerValue();
CreateData.bRandomRotation = true;
@@ -34,17 +34,5 @@ bool ABuildingContainer::SpawnLoot(AFortPawn* Pawn)
auto NewPickup = AFortPickup::SpawnPickup(CreateData);
}
static auto SearchAnimationCountOffset = FindOffsetStruct("/Script/FortniteGame.FortSearchBounceData", "SearchAnimationCount");
static auto SearchBounceDataOffset = this->GetOffset("SearchBounceData");
auto SearchBounceData = this->GetPtr<void>(SearchBounceDataOffset);
(*(int*)(__int64(SearchBounceData) + SearchAnimationCountOffset))++;
static auto OnRep_bAlreadySearchedFn = FindObject<UFunction>(L"/Script/FortniteGame.BuildingContainer.OnRep_bAlreadySearched");
this->ProcessEvent(OnRep_bAlreadySearchedFn);
// Now there is some function called here but idk what it is, it calls OnLoot though.
return true;
}