mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
squad comms, ltms now work less (this will return better in a later update), performance, fixed some versions, fixed vulnerabilities
30 lines
820 B
C++
30 lines
820 B
C++
#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);
|
|
} |