mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
58 lines
2.2 KiB
C++
58 lines
2.2 KiB
C++
#pragma once
|
|
|
|
#include "PlayerController.h"
|
|
#include "FortInventory.h"
|
|
#include "FortPawn.h"
|
|
|
|
#include "Rotator.h"
|
|
#include "BuildingSMActor.h"
|
|
|
|
struct FCreateBuildingActorData { uint32_t BuildingClassHandle; FVector BuildLoc; FRotator BuildRot; bool bMirrored; };
|
|
|
|
class AFortPlayerController : public APlayerController
|
|
{
|
|
public:
|
|
void ClientReportDamagedResourceBuilding(ABuildingSMActor* BuildingSMActor, EFortResourceType PotentialResourceType, int PotentialResourceCount, bool bDestroyed, bool bJustHitWeakspot);
|
|
|
|
AFortInventory*& GetWorldInventory()
|
|
{
|
|
static auto WorldInventoryOffset = GetOffset("WorldInventory");
|
|
return Get<AFortInventory*>(WorldInventoryOffset);
|
|
}
|
|
|
|
AFortPawn*& GetMyFortPawn() // AFortPlayerPawn
|
|
{
|
|
static auto MyFortPawnOffset = GetOffset("MyFortPawn");
|
|
return Get<AFortPawn*>(MyFortPawnOffset);
|
|
}
|
|
|
|
|
|
static UClass* StaticClass()
|
|
{
|
|
static auto Class = FindObject<UClass>("/Script/FortniteGame.FortPlayerController");
|
|
return Class;
|
|
}
|
|
|
|
static void ServerExecuteInventoryItemHook(AFortPlayerController* PlayerController, FGuid ItemGuid)
|
|
{
|
|
auto ItemInstance = PlayerController->GetWorldInventory()->FindItemInstance(ItemGuid);
|
|
auto Pawn = Cast<AFortPawn>(PlayerController->GetPawn());
|
|
|
|
if (!ItemInstance || !Pawn)
|
|
return;
|
|
|
|
if (auto Weapon = Pawn->EquipWeaponDefinition((UFortWeaponItemDefinition*)ItemInstance->GetItemEntry()->GetItemDefinition(), ItemInstance->GetItemEntry()->GetItemGuid()))
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
static void ServerAttemptAircraftJumpHook(AFortPlayerController* PC, FRotator ClientRotation);
|
|
static void ServerCreateBuildingActorHook(AFortPlayerController* PlayerController, FCreateBuildingActorData CreateBuildingData);
|
|
|
|
static void ServerPlayEmoteItemHook(AFortPlayerController* PlayerController, UObject* EmoteAsset);
|
|
|
|
static void ServerBeginEditingBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToEdit);
|
|
static void ServerEditBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToEdit, UClass* NewBuildingClass, int RotationIterations, char bMirrored);
|
|
static void ServerEndEditingBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToStopEditing);
|
|
}; |