fix 1.11 replication, fix some ltm specific stuff, start on shadow stones, fix some events not having foundations, fix s4-s6 gadgets, fix clear inventory on some versions
This commit is contained in:
Milxnor
2023-04-22 23:52:20 -04:00
parent 769dfa08ef
commit 5da8485485
57 changed files with 1869 additions and 888 deletions

View File

@@ -73,6 +73,21 @@ static void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID, bool bUseServerChooseP
// PlayerState->Get(HeroTypeOffset) = HeroDefinition;
}
struct FGhostModeRepData
{
bool& IsInGhostMode()
{
static auto bInGhostModeOffset = FindOffsetStruct("/Script/FortniteGame.GhostModeRepData", "bInGhostMode");
return *(bool*)(__int64(this) + bInGhostModeOffset);
}
UFortWorldItemDefinition*& GetGhostModeItemDef()
{
static auto GhostModeItemDefOffset = FindOffsetStruct("/Script/FortniteGame.GhostModeRepData", "GhostModeItemDef");
return *(UFortWorldItemDefinition**)(__int64(this) + GhostModeItemDefOffset);
}
};
class AFortPlayerControllerAthena : public AFortPlayerController
{
public:
@@ -80,18 +95,28 @@ public:
static inline void (*ServerReadyToStartMatchOriginal)(AFortPlayerControllerAthena* PlayerController);
static inline void (*ServerRequestSeatChangeOriginal)(AFortPlayerControllerAthena* PlayerController, int TargetSeatIndex);
static inline void (*EnterAircraftOriginal)(UObject* PC, AActor* Aircraft);
static inline void (*StartGhostModeOriginal)(UObject* Context, FFrame* Stack, void* Ret);
static inline void (*EndGhostModeOriginal)(AFortPlayerControllerAthena* PlayerController);
AFortPlayerStateAthena* GetPlayerStateAthena()
{
return (AFortPlayerStateAthena*)GetPlayerState();
}
FGhostModeRepData* GetGhostModeRepData()
{
static auto GhostModeRepDataOffset = GetOffset("GhostModeRepData");
return GetPtr<FGhostModeRepData>(GhostModeRepDataOffset);
}
UAthenaMarkerComponent* GetMarkerComponent()
{
static auto MarkerComponentOffset = GetOffset("MarkerComponent");
return Get<UAthenaMarkerComponent*>(MarkerComponentOffset);
}
static void StartGhostModeHook(UObject* Context, FFrame* Stack, void* Ret); // we could native hook this but eh
static void EndGhostModeHook(AFortPlayerControllerAthena* PlayerController);
static void EnterAircraftHook(UObject* PC, AActor* Aircraft);
static void ServerRequestSeatChangeHook(AFortPlayerControllerAthena* PlayerController, int TargetSeatIndex); // actually in zone
static void ServerRestartPlayerHook(AFortPlayerControllerAthena* Controller);