mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user