mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 19:22:22 +01:00
<feat: New project structure>
<feat: New release>
This commit is contained in:
30
dependencies/reboot/Project Reboot 3.0/FortMinigame.cpp
vendored
Normal file
30
dependencies/reboot/Project Reboot 3.0/FortMinigame.cpp
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "FortMinigame.h"
|
||||
#include "FortPlayerControllerAthena.h"
|
||||
|
||||
void AFortMinigame::ClearPlayerInventoryHook(UObject* Context, FFrame& Stack, void* Ret)
|
||||
{
|
||||
auto Minigame = (AFortMinigame*)Context;
|
||||
|
||||
if (!Minigame)
|
||||
return;
|
||||
|
||||
AFortPlayerControllerAthena* PlayerController = nullptr;
|
||||
|
||||
Stack.StepCompiledIn(&PlayerController);
|
||||
|
||||
if (!PlayerController)
|
||||
return;
|
||||
|
||||
auto& ItemInstances = PlayerController->GetWorldInventory()->GetItemList().GetItemInstances();
|
||||
|
||||
for (int i = 0; i < ItemInstances.Num(); ++i)
|
||||
{
|
||||
auto ItemInstance = ItemInstances.at(i);
|
||||
|
||||
PlayerController->GetWorldInventory()->RemoveItem(ItemInstance->GetItemEntry()->GetItemGuid(), nullptr, ItemInstance->GetItemEntry()->GetCount());
|
||||
}
|
||||
|
||||
PlayerController->GetWorldInventory()->Update();
|
||||
|
||||
return ClearPlayerInventoryOriginal(Context, Stack, Ret);
|
||||
}
|
||||
Reference in New Issue
Block a user