mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
Add project files.
This commit is contained in:
53
Project Reboot 3.0/FortPlayerController.h
Normal file
53
Project Reboot 3.0/FortPlayerController.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#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:
|
||||
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 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);
|
||||
};
|
||||
Reference in New Issue
Block a user