From 68000b5d57655ae4d2ae36ae34afbb182a57e14c Mon Sep 17 00:00:00 2001 From: Eccentric Date: Wed, 31 Jan 2024 16:20:26 +0000 Subject: [PATCH] Add other hotfix files --- handlers/storage.go | 35 ++++++++++++++++++++++------------- storage/hotfix.go | 29 +++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 13 deletions(-) diff --git a/handlers/storage.go b/handlers/storage.go index 7c6d6e1..4ff331f 100644 --- a/handlers/storage.go +++ b/handlers/storage.go @@ -11,29 +11,38 @@ import ( ) func GetCloudStorageFiles(c *fiber.Ctx) error { - sum := sha1.Sum(storage.GetDefaultEngine()) - more := sha256.Sum256(storage.GetDefaultEngine()) + files := map[string][]byte { + "DefaultEngine.ini": storage.GetDefaultEngine(), + "DefaultGame.ini": storage.GetDefaultGame(), + "DefaultRuntimeOptions.ini": storage.GetDefaultRuntime(), + } + result := []aid.JSON{} - return c.Status(fiber.StatusOK).JSON([]fiber.Map{ - { - "uniqueFilename": "DefaultEngine.ini", - "filename": "DefaultEngine.ini", - "hash": hex.EncodeToString(sum[:]), - "hash256": hex.EncodeToString(more[:]), - "length": len(storage.GetDefaultEngine()), + for name, data := range files { + sumation1 := sha1.Sum(data) + sumation256 := sha256.Sum256(data) + + result = append(result, aid.JSON{ + "uniqueFilename": name, + "filename": name, + "hash": hex.EncodeToString(sumation1[:]), + "hash256": hex.EncodeToString(sumation256[:]), + "length": len(data), "contentType": "application/octet-stream", "uploaded": aid.TimeStartOfDay(), "storageType": "S3", - "storageIds": fiber.Map{ + "storageIds": aid.JSON{ "primary": "primary", }, "doNotCache": false, - }, - }) + }) + } + + return c.Status(fiber.StatusOK).JSON(result) } func GetCloudStorageConfig(c *fiber.Ctx) error { - return c.Status(fiber.StatusOK).JSON(fiber.Map{ + return c.Status(fiber.StatusOK).JSON(aid.JSON{ "enumerateFilesPath": "/api/cloudstorage/system", "enableMigration": true, "enableWrites": true, diff --git a/storage/hotfix.go b/storage/hotfix.go index e50ead2..e768090 100644 --- a/storage/hotfix.go +++ b/storage/hotfix.go @@ -34,4 +34,33 @@ FortMatchmakingV2.EnableContentBeacon=0 [/Script/Qos.QosRegionManager] NumTestsPerRegion=5 PingTimeout=3.0`) +} + +func GetDefaultGame() []byte { + return []byte(` +[/Script/FortniteGame.FortGlobals] +bAllowLogout=false + +[/Script/FortniteGame.FortChatManager] +bShouldRequestGeneralChatRooms=false +bShouldJoinGlobalChat=false +bShouldJoinFounderChat=false +bIsAthenaGlobalChatEnabled=false + +[/Script/FortniteGame.FortOnlineAccount] +bEnableEulaCheck=false +bShouldCheckIfPlatformAllowed=false`) +} + +func GetDefaultRuntime() []byte { +return []byte(` +[/Script/FortniteGame.FortRuntimeOptions] +bEnableGlobalChat=true +bDisableGifting=false +bDisableGiftingPC=false +bDisableGiftingPS4=false +bDisableGiftingXB=false +!ExperimentalCohortPercent=ClearArray ++ExperimentalCohortPercent=(CohortPercent=100,ExperimentNum=20) +`) } \ No newline at end of file