mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 03:02:22 +01:00
22 lines
1004 B
C++
22 lines
1004 B
C++
#include "FortGadgetItemDefinition.h"
|
|
#include "FortAbilitySet.h"
|
|
#include "SoftObjectPath.h"
|
|
#include "FortPlayerStateAthena.h"
|
|
#include "addresses.h"
|
|
#include "FortPlayerPawnAthena.h"
|
|
#include "FortPlayerControllerAthena.h"
|
|
|
|
void UFortGadgetItemDefinition::UnequipGadgetData(AFortPlayerController* PlayerController, UFortItem* Item)
|
|
{
|
|
static auto FortInventoryOwnerInterfaceClass = FindObject<UClass>("/Script/FortniteGame.FortInventoryOwnerInterface");
|
|
__int64 (*RemoveGadgetDataOriginal)(UFortGadgetItemDefinition* a1, __int64 a2, UFortItem* a3) = decltype(RemoveGadgetDataOriginal)(Addresses::RemoveGadgetData);
|
|
RemoveGadgetDataOriginal(this, __int64(PlayerController->GetInterfaceAddress(FortInventoryOwnerInterfaceClass)), Item);
|
|
|
|
if (auto CosmeticLoadoutPC = PlayerController->GetCosmeticLoadout())
|
|
{
|
|
if (auto CharacterToApply = CosmeticLoadoutPC->GetCharacter())
|
|
{
|
|
ApplyCID(Cast<AFortPlayerPawn>(PlayerController->GetMyFortPawn()), CharacterToApply); // idk why no automatic
|
|
}
|
|
}
|
|
} |