haha forgot to push,,,
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using BestHTTP;
|
||||
using Il2CppInterop.Runtime;
|
||||
using undead_universal_patch_il2cpp.Core.Config;
|
||||
using undead_universal_patch_il2cpp.Patches.Photon;
|
||||
using UnityEngine;
|
||||
@@ -24,31 +23,32 @@ public class CustomPhoton : MonoBehaviour
|
||||
|
||||
public void Start()
|
||||
{
|
||||
RecNetInteractions.postLocalAccountActions.Add(DownloadServerConfig);
|
||||
if (ServerPatchesConfig.CustomPhoton.Value) RecNetInteractions.postLocalAccountActions.Add(DownloadServerConfig);
|
||||
else if (PhotonConfig.PatchPhotonIds.Value) LocalPatch();
|
||||
}
|
||||
|
||||
void LocalPatch()
|
||||
{
|
||||
UniversalPatchPlugin.Log.LogInfo("Attempting Photon patch from local configuration");
|
||||
PhotonPatch.Patch(new PhotonConfigDTO
|
||||
{
|
||||
Logging = PhotonConfig.PunLogging.Value,
|
||||
AppID = PhotonConfig.AppID.Value,
|
||||
VoiceAppID = PhotonConfig.VoiceAppID.Value,
|
||||
SelfHosted = PhotonConfig.SelfHosted.Value,
|
||||
ServerAddress = PhotonConfig.ServerAddress.Value,
|
||||
ServerPort = PhotonConfig.ServerPort.Value,
|
||||
ConnectionProtocol = PhotonConfig.ConnectionProtocol.Value
|
||||
});
|
||||
}
|
||||
|
||||
void OnServerConfigFailed(HTTPResponse res)
|
||||
{
|
||||
ServerConfigFailed = true;
|
||||
if (PhotonConfig.PatchPhotonIds.Value)
|
||||
{
|
||||
UniversalPatchPlugin.Log.LogInfo("Attempting Photon patch from local configuration");
|
||||
PhotonPatch.Patch(new PhotonConfigDTO
|
||||
{
|
||||
Logging = PhotonConfig.PunLogging.Value,
|
||||
AppID = PhotonConfig.AppID.Value,
|
||||
VoiceAppID = PhotonConfig.VoiceAppID.Value,
|
||||
SelfHosted = PhotonConfig.SelfHosted.Value,
|
||||
ServerAddress = PhotonConfig.ServerAddress.Value,
|
||||
ServerPort = PhotonConfig.ServerPort.Value,
|
||||
ConnectionProtocol = PhotonConfig.ConnectionProtocol.Value
|
||||
});
|
||||
}
|
||||
if (PhotonConfig.PatchPhotonIds.Value) LocalPatch();
|
||||
}
|
||||
void ApplyPhotonConfig(HTTPResponse res, PhotonConfigDTO photonConfig)
|
||||
{
|
||||
if (!ServerPatchesConfig.CustomPhoton.Value) return;
|
||||
|
||||
try
|
||||
{
|
||||
UniversalPatchPlugin.Log.LogInfo("Attempting Photon patch from server configuration");
|
||||
|
||||
Reference in New Issue
Block a user