haha forgot to push,,,
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP;
|
||||
using undead_universal_patch_il2cpp.Patches.UndeadGameManager;
|
||||
using UnityEngine;
|
||||
|
||||
namespace undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CustomGameManager;
|
||||
|
||||
public class CustomFreeSpawns : MonoBehaviour
|
||||
{
|
||||
public void Start()
|
||||
{
|
||||
RecNetInteractions.postAuthenticationActions.Add(DownloadFreeSpawns);
|
||||
}
|
||||
|
||||
public void OnFailed([Optional] HTTPResponse res)
|
||||
{
|
||||
Util.ConditionalDebug($"CustomFreeSpawns failed: HTTP Error {res.StatusCode}");
|
||||
}
|
||||
|
||||
public void Finished(HTTPResponse res, List<string> spawns)
|
||||
{
|
||||
FreeSpawnsPatch_Array.spawns = spawns;
|
||||
}
|
||||
|
||||
public void DownloadFreeSpawns()
|
||||
{
|
||||
RecNetInteractions.SendRequest<List<string>>(HTTPMethods.Get, RecNet.Service.API, "/api/undead/v1/freespawns", Finished, OnFailed);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP;
|
||||
using undead_universal_patch_il2cpp.Core.Content.UndeadGameManager;
|
||||
using undead_universal_patch_il2cpp.Patches.UndeadGameManager;
|
||||
using UnityEngine;
|
||||
|
||||
namespace undead_universal_patch_il2cpp.Core.Content.CustomRecNet.CustomGameManager;
|
||||
|
||||
public class CustomGameManager : MonoBehaviour
|
||||
{
|
||||
public void Start()
|
||||
{
|
||||
RecNetInteractions.postAuthenticationActions.Add(DownlaodGameConfigAssets);
|
||||
}
|
||||
|
||||
public void OnFailed([Optional] HTTPResponse res)
|
||||
{
|
||||
Util.ConditionalDebug($"CustomGameManager failed: HTTP Error {res.StatusCode}");
|
||||
}
|
||||
|
||||
public void Finished(HTTPResponse res, Dictionary<string, GameConfigurationAssetDTO> configs)
|
||||
{
|
||||
GameConfiguratorPatch.gameConfig = configs;
|
||||
}
|
||||
|
||||
public void DownlaodGameConfigAssets()
|
||||
{
|
||||
RecNetInteractions.SendRequest<Dictionary<string, GameConfigurationAssetDTO>>(HTTPMethods.Get, RecNet.Service.API, "/api/undead/v1/gameconfigassets", Finished, OnFailed);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user