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

@@ -3,10 +3,54 @@
#include "Object.h"
#include "Stack.h"
#include "GameplayAbilityTypes.h"
#include "FortWorldItemDefinition.h"
struct FActiveItemGrantInfo
{
static UStruct* GetStruct()
{
static auto Struct = FindObject<UStruct>("/Script/FortniteGame.ActiveItemGrantInfo");
return Struct;
}
static int GetStructSize() { return GetStruct()->GetPropertiesSize(); }
UFortWorldItemDefinition*& GetItem()
{
static auto ItemOffset = FindOffsetStruct("/Script/FortniteGame.ActiveItemGrantInfo", "Item");
return *(UFortWorldItemDefinition**)(__int64(this) + ItemOffset);
}
FScalableFloat& GetAmountToGive()
{
static auto AmountToGiveOffset = FindOffsetStruct("/Script/FortniteGame.ActiveItemGrantInfo", "AmountToGive");
return *(FScalableFloat*)(__int64(this) + AmountToGiveOffset);
}
FScalableFloat& GetMaxAmount()
{
static auto MaxAmountOffset = FindOffsetStruct("/Script/FortniteGame.ActiveItemGrantInfo", "MaxAmount");
return *(FScalableFloat*)(__int64(this) + MaxAmountOffset);
}
};
class UFortGameplayAbilityAthena_PeriodicItemGrant : public UObject // UFortGameplayAbility
{
public:
static inline void (*StartItemAwardTimersOriginal)(UObject* Context, FFrame& Stack, void* Ret);
TMap<FActiveItemGrantInfo, FScalableFloat>& GetItemsToGrant()
{
static auto ItemsToGrantOffset = GetOffset("ItemsToGrant");
return Get<TMap<FActiveItemGrantInfo, FScalableFloat>>(ItemsToGrantOffset);
}
TArray<FTimerHandle>& GetActiveTimers()
{
static auto ActiveTimersOffset = GetOffset("ActiveTimers");
return Get<TArray<FTimerHandle>>(ActiveTimersOffset);
}
static void StartItemAwardTimersHook(UObject* Context, FFrame& Stack, void* Ret);
};