using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security.Permissions;
using A2.NoPlayFab.Patches.PlayFabManagerPatches;
using BepInEx;
using HarmonyLib;
using Jotunn;
using Jotunn.Utils;
using Microsoft.CodeAnalysis;
using PlayFab;
using PlayFab.ClientModels;
using PlayFab.CloudScriptModels;
using PlayFab.MultiplayerModels;
using Splatform;
using Steamworks;
using UnityEngine;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("No PlayFab")]
[assembly: AssemblyDescription("Removes PlayFab code.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("No PlayFab")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c9f76538-ab5e-d41e-8b4c-0716078e2752")]
[assembly: AssemblyFileVersion("0.1.2.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.2.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
internal static class PluginInfo
{
public const string PluginGUID = "A2.NoPlayFab";
public const string PluginName = "No PlayFab";
public const string PluginDescription = "Removes PlayFab code.";
public const string PluginSemanticVersion = "0.1.2";
public const string PluginFullVersion = "0.1.2.0";
}
namespace System.Runtime.CompilerServices
{
[EditorBrowsable(EditorBrowsableState.Never)]
internal static class IsExternalInit
{
}
}
namespace A2.NoPlayFab
{
[BepInPlugin("A2.NoPlayFab", "No PlayFab", "0.1.2")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
internal class Plugin : BaseUnityPlugin
{
private static readonly Harmony _harmony = new Harmony("A2.NoPlayFab");
private static bool _isPatched = false;
public void Awake()
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Invalid comparison between Unknown and I4
if ((int)SystemInfo.graphicsDeviceType != 4)
{
_isPatched = true;
_harmony.PatchAll();
}
}
public void OnDestroy()
{
if (_isPatched)
{
_harmony.UnpatchSelf();
}
}
}
}
namespace A2.NoPlayFab.Patches.ZPlayFabMatchmakingPatches
{
public static class ZPlayFabMatchmakingActivateSessionPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "ActivateSession")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class ZPlayFabMatchmakingCheckJoinCodeIsUniquePatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "CheckJoinCodeIsUnique")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class ZPlayFabMatchmakingDeleteLobbyPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "DeleteLobby")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(string lobbyId)
{
return false;
}
}
}
public static class ZPlayFabMatchmakingOnNetworkChangedPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "OnNetworkChanged")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(object sender, string newNetworkId)
{
return false;
}
}
}
public static class ZPlayFabMatchmakingRegenerateLobbyJoinCodePatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "RegenerateLobbyJoinCode")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class ZPlayFabMatchmakingLeaveEmptyLobbyPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "LeaveEmptyLobby")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class ZPlayFabMatchmakingCreateLobbyPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "CreateLobby")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(bool refresh, Action<CreateLobbyResult> resultCallback, Action<PlayFabError> errorCallback)
{
return false;
}
}
}
public static class ZPlayFabMatchmakingOnRefreshFailedPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "OnRefreshFailed")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(PlayFabError err)
{
return false;
}
}
}
public static class ZPlayFabMatchmakingRefreshLobbyPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "RefreshLobby")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(float deltaTime)
{
return false;
}
}
}
public static class ZPlayFabMatchmakingReconnectNetworkPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "ReconnectNetwork")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref bool __result, float deltaTime)
{
__result = false;
return false;
}
}
}
public static class ZPlayFabMatchmakingCreateAndJoinNetworkPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "CreateAndJoinNetwork")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class ZPlayFabMatchmakingUnregisterServerPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "UnregisterServer")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class ZPlayFabMatchmakingRegisterServerPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "RegisterServer")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(string name, bool havePassword, bool isCommunityServer, GameVersion gameVersion, string[] modifiers, uint networkVersion, string worldName, bool needServerAccount = true)
{
return false;
}
}
}
public static class ZPlayFabMatchmakingLookupPublicIPPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "LookupPublicIP")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class ZPlayFabMatchmakingResetPartyPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "ResetParty")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class ZPlayFabMatchmakingLeaveLobbyPatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "LeaveLobby")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(string lobbyId)
{
return false;
}
}
}
public static class ZPlayFabMatchmakingUpdatePatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "Update")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(float deltaTime)
{
return false;
}
}
}
public static class ZSteamMatchmakingGetLobbyServerDataPatch
{
[HarmonyPatch(typeof(ZSteamMatchmaking), "GetLobbyServerData")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static void Postfix(ref ServerData __result, CSteamID lobbyID)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Invalid comparison between Unknown and I4
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
if ((int)__result.m_joinData.m_type == 2)
{
__result = ServerData.None;
}
}
}
}
public static class ZPlayFabMatchmakingInitializePatch
{
[HarmonyPatch(typeof(ZPlayFabMatchmaking), "Initialize")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(bool isServer)
{
return false;
}
}
}
public static class ZPlayFabMatchmakingJoinCodePatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref string __result)
{
__result = string.Empty;
return false;
}
}
}
public static class ZPlayFabMatchmakingPublicIPPatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref string __result)
{
__result = string.Empty;
return false;
}
}
}
}
namespace A2.NoPlayFab.Patches.ZPlayFabLobbySearchPatches
{
public static class ZPlayFabLobbySearcFindLobbyPatch
{
[HarmonyPatch(typeof(ZPlayFabLobbySearch), "FindLobby")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ZPlayFabLobbySearch __instance)
{
if (__instance?.m_finishedAction != null)
{
__instance.IsDone = true;
__instance.m_finishedAction.Invoke((ZPLayFabMatchmakingFailReason)0);
}
return false;
}
}
}
}
namespace A2.NoPlayFab.Patches.PlayFabMatchmakingPatches
{
public static class PlayFabMatchmakingIsAvailablePatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref bool __result)
{
__result = false;
return false;
}
}
}
public static class PlayFabMatchmakingCancelPlayFabServerSearchPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "CancelPlayFabServerSearch")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabMatchmakingCanRefreshServerNowPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "CanRefreshServerNow")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref bool __result)
{
__result = false;
return false;
}
}
}
public static class PlayFabMatchmakingCanRefreshServerOfTypeNowPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "CanRefreshServerOfTypeNow")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref bool __result, ServerJoinDataType type)
{
__result = false;
return false;
}
}
}
public static class PlayFabMatchmakingConstructorPatch
{
[HarmonyPatch]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static MethodBase TargetMethod()
{
return typeof(PlayFabMatchmaking).GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, Type.EmptyTypes, null);
}
public static void Postfix(PlayFabMatchmaking __instance)
{
__instance.Dispose();
}
}
}
public static class PlayFabMatchmakingFilteredPublicServerListPatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref IReadOnlyList<ServerData> __result)
{
__result = _empty;
return false;
}
}
private static readonly IReadOnlyList<ServerData> _empty = new List<ServerData>().AsReadOnly();
}
public static class PlayFabMatchmakingGetServerMatchmakingDataPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "GetServerMatchmakingData")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref ServerMatchmakingData __result, ServerJoinData server, DateTime newerThanUtc)
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
__result = new ServerMatchmakingData(newerThanUtc.AddTicks(1L), true);
return false;
}
}
}
public static class PlayFabMatchmakingIsPendingPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "IsPending", new Type[] { typeof(ServerJoinData) })]
[HarmonyPriority(int.MinValue)]
public static class Patch1
{
public static bool Prefix(ref bool __result, ServerJoinData server)
{
__result = false;
return false;
}
}
[HarmonyPatch(typeof(PlayFabMatchmaking), "IsPending", new Type[] { typeof(PlatformUserID) })]
[HarmonyPriority(int.MinValue)]
public static class Patch2
{
public static bool Prefix(ref bool __result, PlatformUserID server)
{
__result = false;
return false;
}
}
}
public static class PlayFabMatchmakingIsRefreshingPublicServerListPatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref bool __result)
{
__result = false;
return false;
}
}
}
public static class PlayFabMatchmakingOnPlayFabLoginFinishedPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "OnPlayFabLoginFinished")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(LoginType loginType)
{
return false;
}
}
}
public static class PlayFabMatchmakingPlayFabPingFailedPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "PlayFabPingFailed")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ZPLayFabMatchmakingFailReason failReason)
{
return false;
}
}
}
public static class PlayFabMatchmakingPlayFabPingSuccessPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "PlayFabPingSuccess")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(PlayFabMatchmakingServerData serverData)
{
return false;
}
}
}
public static class PlayFabMatchmakingPlayFabServerSearchDonePatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "PlayFabServerSearchDone")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ZPLayFabMatchmakingFailReason failedReason)
{
return false;
}
}
}
public static class PlayFabMatchmakingPlayFabServersFoundPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "PlayFabServersFound")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(PlayFabMatchmakingServerData[] serverDatas)
{
return false;
}
}
}
public static class PlayFabMatchmakingPublicServerCountPatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref uint __result)
{
__result = 0u;
return false;
}
}
}
public static class PlayFabMatchmakingRefreshPublicServerListPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "RefreshPublicServerList")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(RefreshPublicServerListFlags flags)
{
return false;
}
}
}
public static class PlayFabMatchmakingRefreshServerPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "RefreshServer")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref bool __result, ServerJoinData server, MatchmakingDataRetrievedHandler completedCallback)
{
__result = false;
return false;
}
}
}
public static class PlayFabMatchmakingResolveJoinCodePatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "ResolveJoinCode")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(string joinCode, MatchmakingDataRetrievedHandler successCallback, ZPlayFabMatchmakingFailedCallback failedCallback)
{
if (failedCallback != null)
{
failedCallback.Invoke((ZPLayFabMatchmakingFailReason)5);
}
return false;
}
}
}
public static class PlayFabMatchmakingResolveServerFromHostUserPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "ResolveServerFromHostUser")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref bool __result, PlatformUserID hostUser, MatchmakingDataRetrievedHandler completedCallback)
{
__result = false;
return false;
}
}
}
public static class PlayFabMatchmakingSetMatchmakingDataCacheEntryPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "SetMatchmakingDataCacheEntry")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ServerJoinData server, ServerMatchmakingData serverMatchmakingData)
{
return false;
}
}
}
public static class PlayFabMatchmakingSetPublicServerListFilterPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "SetPublicServerListFilter")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(string filter)
{
return false;
}
}
}
public static class PlayFabMatchmakingSetResultPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "SetResult")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ServerData result)
{
return false;
}
}
}
public static class PlayFabMatchmakingSetResultFromTemporaryListToPublicListPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "SetResultFromTemporaryListToPublicList")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabMatchmakingTickPatch
{
[HarmonyPatch(typeof(PlayFabMatchmaking), "Tick")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
}
namespace A2.NoPlayFab.Patches.PlayFabManagerPatches
{
public static class PlayFabManagerAwakePatch
{
[HarmonyPatch(typeof(PlayFabManager), "Awake")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabManagerDelayedVCRedistWarningPopupPatch
{
[HarmonyPatch(typeof(PlayFabManager), "DelayedVCRedistWarningPopup")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabManagerDeletePlayerTitleAccountPatch
{
[HarmonyPatch(typeof(PlayFabManager), "DeletePlayerTitleAccount")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabManagerEnsureMultiplayerManagerCreatedPatch
{
[HarmonyPatch(typeof(PlayFabManager), "EnsureMultiplayerManagerCreated")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabManagerHandleLogPatch
{
[HarmonyPatch(typeof(PlayFabManager), "HandleLog")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(string logString, string stackTrace, LogType type)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Expected I4, but got Unknown
switch ((int)type)
{
case 0:
Logger.LogError((object)(logString ?? ""));
break;
case 4:
Logger.LogError((object)(logString + "\n" + stackTrace));
break;
case 2:
Logger.LogError((object)(logString ?? ""));
break;
case 3:
Logger.LogInfo((object)(logString ?? ""));
break;
case 1:
Logger.LogDebug((object)(logString ?? ""));
break;
}
return false;
}
}
}
public static class PlayFabManagerInitializePatch
{
[HarmonyPatch(typeof(PlayFabManager), "Initialize")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
if (PlayFabManager.instance == null)
{
new GameObject("PlayFabManager").AddComponent<PlayFabManager>();
}
return false;
}
}
}
public static class PlayFabManagerIsLoggedInPatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref bool __result)
{
__result = NextValue;
NextValue = false;
return false;
}
}
public static bool NextValue;
}
public static class PlayFabManagerLoginPatch
{
[HarmonyPatch(typeof(PlayFabManager), "Login")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabManagerLoginFailedPatch
{
[HarmonyPatch(typeof(PlayFabManager), "LoginFailed")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabManagerOnCloudDeletePlayerResultPatch
{
[HarmonyPatch(typeof(PlayFabManager), "OnCloudDeletePlayerResult")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ExecuteCloudScriptResult obj)
{
return false;
}
}
}
public static class PlayFabManagerOnDeletePlayerFailedPatch
{
[HarmonyPatch(typeof(PlayFabManager), "OnDeletePlayerFailed")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(PlayFabError error)
{
return false;
}
}
}
public static class PlayFabManagerOnLoginFailurePatch
{
[HarmonyPatch(typeof(PlayFabManager), "OnLoginFailure")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(PlayFabError error)
{
return false;
}
}
}
public static class PlayFabManagerOnLoginSuccessPatch
{
[HarmonyPatch(typeof(PlayFabManager), "OnLoginSuccess")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(LoginResult result)
{
return false;
}
}
}
public static class PlayFabManagerOnPlayFabRespondRemoveUIBlockPatch
{
[HarmonyPatch(typeof(PlayFabManager), "OnPlayFabRespondRemoveUIBlock")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(LoginType loginType)
{
return false;
}
}
}
public static class PlayFabManagerRetryLoginAfterDelayPatch
{
[HarmonyPatch(typeof(PlayFabManager), "RetryLoginAfterDelay")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(float delay)
{
return false;
}
}
}
public static class PlayFabManagerSetShouldTryAutoLoginPatch
{
[HarmonyPatch(typeof(PlayFabManager), "SetShouldTryAutoLogin")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(PlayFabManager __instance, bool value)
{
__instance.m_shouldTryAutoLogin = false;
return false;
}
}
}
public static class PlayFabManagerStartPatch
{
[HarmonyPatch(typeof(PlayFabManager), "Start")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(PlayFabManager __instance)
{
if (PlayFabManager.instance != null && __instance != null)
{
Object.Destroy((Object)(object)__instance);
}
else
{
if (__instance != null)
{
Object.DontDestroyOnLoad((Object)(object)((Component)__instance).gameObject);
}
PlayFabManager.instance = __instance;
}
return false;
}
}
}
public static class PlayFabManagerStopListeningToLogMsgsPatch
{
[HarmonyPatch(typeof(PlayFabManager), "StopListeningToLogMsgs")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabManagerUpdatePatch
{
[HarmonyPatch(typeof(PlayFabManager), "Update")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabManagerUpdateEntityTokenCoroutinePatch
{
[HarmonyPatch(typeof(PlayFabManager), "UpdateEntityTokenCoroutine")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
[CompilerGenerated]
private sealed class <EmptyCoroutine>d__1 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <EmptyCoroutine>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
if (<>1__state != 0)
{
return false;
}
<>1__state = -1;
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
public static bool Prefix(ref IEnumerator __result)
{
__result = EmptyCoroutine();
return false;
}
[IteratorStateMachine(typeof(<EmptyCoroutine>d__1))]
private static IEnumerator EmptyCoroutine()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <EmptyCoroutine>d__1(0);
}
}
}
public static class PlayFabManagerWaitForPopupEnabledPatch
{
[HarmonyPatch(typeof(PlayFabManager), "WaitForPopupEnabled")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
}
namespace A2.NoPlayFab.Patches.PlayFabAuthWithGameCenterPatches
{
public static class PlayFabAuthWithGameCenterLoginPatch
{
[HarmonyPatch(typeof(PlayFabAuthWithGameCenter), "Login")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class PlayFabAuthWithGameCenterOnLoginFailurePatch
{
[HarmonyPatch(typeof(PlayFabAuthWithGameCenter), "OnLoginFailure")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(PlayFabError error)
{
return false;
}
}
}
public static class PlayFabAuthWithGameCenterOnLoginSuccessPatch
{
[HarmonyPatch(typeof(PlayFabAuthWithGameCenter), "OnLoginSuccess")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(LoginResult result)
{
return false;
}
}
}
}
namespace A2.NoPlayFab.Patches.FejdStartupPatches
{
public static class FejdStartupAutoJoinServerPatch
{
[HarmonyPatch(typeof(FejdStartup), "AutoJoinServer")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(string joinCode)
{
return false;
}
}
}
public static class FejdStartupAwakePlayFabPatch
{
[HarmonyPatch(typeof(FejdStartup), "AwakePlayFab")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ref bool __result)
{
PlayFabManager.Initialize();
__result = true;
return false;
}
}
}
public static class FejdStartupContinueWhenLoggedInPopupPatch
{
[HarmonyPatch(typeof(FejdStartup), "ContinueWhenLoggedInPopup")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(ContinueAction continueAction)
{
return false;
}
}
}
public static class FejdStartupGetOnlineBackendPatch
{
[HarmonyPatch(typeof(FejdStartup), "GetOnlineBackend")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(bool crossplayServer, ref OnlineBackendType __result)
{
__result = (OnlineBackendType)(crossplayServer ? 4 : 0);
return false;
}
}
}
public static class FejdStartupJoinServerTabPatch
{
[HarmonyPatch(typeof(FejdStartup), "JoinServer")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static PopupButtonCallback <>9__0_0;
internal void <Prefix>b__0_0()
{
UnifiedPopup.Pop();
}
}
public static bool Prefix(FejdStartup __instance)
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Invalid comparison between Unknown and I4
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Expected O, but got Unknown
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Expected O, but got Unknown
if ((int)__instance.m_joinServer.m_type == 2)
{
object obj = <>c.<>9__0_0;
if (obj == null)
{
PopupButtonCallback val = delegate
{
UnifiedPopup.Pop();
};
<>c.<>9__0_0 = val;
obj = (object)val;
}
UnifiedPopup.Push((PopupBase)new WarningPopup("PlayFab disabled", "Cannot join server because PlayFab is disabled.", (PopupButtonCallback)obj, true));
return false;
}
PlayFabManagerIsLoggedInPatch.NextValue = true;
return true;
}
}
}
public static class FejdStartupOnOpenServerToggleClickedPatch
{
[HarmonyPatch(typeof(FejdStartup), "OnOpenServerToggleClicked")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(bool wasToggledOn)
{
return false;
}
}
}
public static class FejdStartupOnServerListTabPatch
{
[HarmonyPatch(typeof(FejdStartup), "OnServerListTab")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class FejdStartupOnWorldStartPatch
{
[HarmonyPatch(typeof(FejdStartup), "OnWorldStart")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix(FejdStartup __instance)
{
if (PlayerPrefs.GetInt("crossplay", 0) != 0)
{
PlayerPrefs.SetInt("crossplay", 0);
}
__instance.m_crossplayServerToggle.isOn = false;
return true;
}
}
}
public static class FejdStartupUpdatePatch
{
[HarmonyPatch(typeof(FejdStartup), "Update")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static void Postfix(FejdStartup __instance)
{
if (__instance.m_startGamePanel.activeInHierarchy)
{
__instance.SetToggleState(__instance.m_crossplayServerToggle, false);
}
}
}
}
public static class FejdStartupRefreshWorldSelectionPatch
{
[HarmonyPatch(typeof(FejdStartup), "RefreshWorldSelection")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
if (PlayerPrefs.GetInt("crossplay", 0) != 0)
{
PlayerPrefs.SetInt("crossplay", 0);
}
return true;
}
public static void Postfix(FejdStartup __instance)
{
Toggle crossplayServerToggle = __instance.m_crossplayServerToggle;
crossplayServerToggle.isOn = false;
((Behaviour)crossplayServerToggle).enabled = false;
}
}
}
public static class FejdStartupShowLogInWithPlayFabWindowPatch
{
[HarmonyPatch(typeof(FejdStartup), "ShowLogInWithPlayFabWindow")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class FejdStartupShowOnlineMultiplayerPrivilegeWarningPatch
{
[HarmonyPatch(typeof(FejdStartup), "ShowOnlineMultiplayerPrivilegeWarning")]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static bool Prefix()
{
return false;
}
}
}
public static class MultiBackendMatchmakingConstructorPatch
{
[HarmonyPatch(/*Could not decode attribute arguments.*/)]
[HarmonyPriority(int.MinValue)]
public static class Patch
{
public static void Postfix(MultiBackendMatchmaking __instance)
{
IMatchmakingBackend val = ((IEnumerable<IMatchmakingBackend>)__instance.m_backends).FirstOrDefault((Func<IMatchmakingBackend, bool>)((IMatchmakingBackend b) => b is PlayFabMatchmaking));
if (val != null)
{
__instance.m_backends.Remove(val);
((IDisposable)val).Dispose();
}
}
}
}
}
namespace A2.NoPlayFab.Consts
{
internal static class Harmony
{
public const bool HARMONY_PREFIX_RESULT_CONTINUE = true;
public const bool HARMONY_PREFIX_RESULT_BREAK = false;
public const int HARMONY_PATCH_PRIORITY_FIRST = int.MinValue;
}
}