diff --git a/Project Reboot 3.0/calendar.h b/Project Reboot 3.0/calendar.h index c5d9065..980f2ee 100644 --- a/Project Reboot 3.0/calendar.h +++ b/Project Reboot 3.0/calendar.h @@ -8,7 +8,7 @@ namespace Calendar { static inline bool HasSnowModification() { - return Fortnite_Version == 7.30 || Fortnite_Version == 11.31 || Fortnite_Version == 19.10; + return Fortnite_Version == 7.30 || Fortnite_Version == 11.31 || Fortnite_Version == 15.10 || Fortnite_Version == 19.10; } static inline UObject* GetSnowSetup() @@ -40,9 +40,42 @@ namespace Calendar return -1; } + static inline void EnableFog() + { + auto SnowSetup = GetSnowSetup(); + + if (SnowSetup) + { + static auto Onready1 = FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.OnReady_E426AA7F4F2319EA06FBA2B9905F0B24"); + static auto Onready2 = FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.OnReady_0A511B314AE165C51798519FB84738B8"); + static auto refrehsdmap = FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C:RefreshMapLocations"); + + auto GameState = (AFortGameStateAthena*)GetWorld()->GetGameState(); + + GET_PLAYLIST(GameState) + + struct { UObject* GameState; UObject* Playlist; FGameplayTagContainer PlaylistContextTags; } OnReadyParams{ GameState, CurrentPlaylist, FGameplayTagContainer()}; + + SnowSetup->ProcessEvent(Onready1, &OnReadyParams); + SnowSetup->ProcessEvent(Onready2, &OnReadyParams); + SnowSetup->ProcessEvent(refrehsdmap); // needed? + } + } + + static inline void SetSnowfall(float NewValue) // idk bruh i think setsnow also does this math things who knows + { + static auto SetSnowfallFn = FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.SetSnowFall"); + auto SnowSetup = GetSnowSetup(); + + if (SetSnowfallFn && SnowSetup) + { + SnowSetup->ProcessEvent(SetSnowfallFn, &NewValue); + } + } + static inline void SetSnow(float NewValue) { - static auto SetSnowFn = FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.OnReady_0A511B314AE165C51798519FB84738B8") ? FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.OnReady_0A511B314AE165C51798519FB84738B8") : + static auto SetSnowFn = FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.SetSnow") ? FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.SetSnow") : FindObject(L"/Game/Athena/Environments/Landscape/Blueprints/BP_SnowSetup.BP_SnowSetup_C.SetSnow"); auto SnowSetup = GetSnowSetup(); @@ -53,6 +86,8 @@ namespace Calendar auto GameState = (AFortGameStateAthena*)GetWorld()->GetGameState(); GET_PLAYLIST(GameState) + + /* struct { UObject* GameState; UObject* Playlist; FGameplayTagContainer PlaylistContextTags; } OnReadyParams{ GameState, CurrentPlaylist, FGameplayTagContainer()}; UFunction* OnReadyFunc = FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.OnReady_0A511B314AE165C51798519FB84738B8"); @@ -64,8 +99,14 @@ namespace Calendar SnowSetup->ProcessEvent(OnReadyFunc, &OnReadyParams); } + */ + LOG_INFO(LogDev, "Called OnReady!"); + SnowSetup->ProcessEvent(SetSnowFn, &NewValue); + + LOG_INFO(LogDev, "Called SetSnow!"); + return; if (NewValue != -1) @@ -85,6 +126,12 @@ namespace Calendar static auto ada = FindObject(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.SetFullSnowEd"); SnowSetup->ProcessEvent(ada); + + + } + else + { + LOG_INFO(LogDev, "Failed TO FIND!"); } } -} \ No newline at end of file +}