using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Cysharp.Threading.Tasks;
using Cysharp.Threading.Tasks.CompilerServices;
using HarmonyLib;
using Newtonsoft.Json;
using QFSW.QC;
using RCGFSM.PlayerAbility;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("NineSolsPlugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("NineSolsPlugin")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("181a46b5-f9aa-45c1-905f-f62be3e98520")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.1", FrameworkDisplayName = ".NET Framework 4.7.1")]
[assembly: AssemblyVersion("1.0.0.0")]
public class LocalizationManager
{
private Dictionary<string, string> _localizationStrings;
private string _currentLanguage;
public LocalizationManager()
{
_currentLanguage = "zh-cn";
LoadLocalizationStrings(_currentLanguage);
}
public void SetLanguage(string languageCode)
{
_currentLanguage = languageCode;
LoadLocalizationStrings(languageCode);
}
private void LoadLocalizationStrings(string languageCode)
{
_localizationStrings = new Dictionary<string, string>();
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "strings_" + languageCode + ".json");
if (File.Exists(path))
{
string text = File.ReadAllText(path);
_localizationStrings = JsonConvert.DeserializeObject<Dictionary<string, string>>(text);
}
}
public string GetString(string key)
{
if (_localizationStrings.TryGetValue(key, out var value))
{
return value;
}
return key;
}
}
namespace NineSolsPlugin;
public class Patch
{
[HarmonyPrefix]
[HarmonyPatch(typeof(QuantumConsole), "IsSupportedState")]
public static bool IsSupportedState(ref bool __result)
{
if (Plugin.Instance.isEnableConsole.Value)
{
__result = true;
return false;
}
return true;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(MonsterBase), "DecreasePosture")]
public static bool DecreasePosture(ref EffectHitData data, ref float scale)
{
if (Plugin.Instance.isOneHitKill)
{
scale = 9999f;
}
return true;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(FOV_Follower), "Update")]
public static bool FOV_Follower_Update(ref FOV_Follower __instance)
{
if ((Object)(object)__instance.followCamera == (Object)null)
{
return false;
}
if (Plugin.Instance.isFov && Plugin.Instance.fov > 0f)
{
Traverse.Create((object)__instance).Field("mCamera").GetValue<Camera>()
.fieldOfView = Plugin.Instance.fov;
}
else
{
Traverse.Create((object)__instance).Field("mCamera").GetValue<Camera>()
.fieldOfView = __instance.followCamera.fieldOfView;
}
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(SkillTreeUI), "UpgradeCheck")]
public static bool UpgradeCheck(ref SkillTreeUI __instance)
{
if (Plugin.Instance.isFastLearnSkill)
{
__instance.longPressSubmit.submitTime = 0f;
}
else
{
__instance.longPressSubmit.submitTime = 1f;
}
return true;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(BossGeneralState), "OnStateUpdate")]
public static bool OnStateUpdate(ref BossGeneralState __instance)
{
if (Plugin.Instance.showSupportWindow)
{
Plugin.Instance.SupportText = ((Object)((Component)__instance).gameObject).name;
}
return true;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(MonsterBase), "UnFreeze")]
public static bool UnFreeze(ref MonsterBase __instance)
{
if (Plugin.Instance.isBossSpeed)
{
Traverse.Create((object)__instance).Field("isFreezing").SetValue((object)false);
Plugin.Instance.modifyBossSpeed(Plugin.Instance.bossSpeed);
return false;
}
return true;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(SkillNodeUIControlButton), "UpdateView")]
public static bool UpdateView(ref SkillNodeUIControlButton __instance)
{
((Component)__instance).GetComponent<Animator>().SetBool(Animator.StringToHash("Activated"), false);
return true;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(PlayerSitAtSavePointCondition), "get_isValid")]
public static bool PatchIsSitAtSavePoint(ref PlayerSitAtSavePointCondition __instance, ref bool __result)
{
if (Plugin.Instance.isSitAtSavePoint && ((Object)__instance).name.Contains("[Condition]"))
{
__result = true;
return false;
}
return true;
}
}
public static class MonsterBasePatcher
{
[HarmonyPrefix]
public static bool UpdateAnimatorSpeed(ref MonsterBase __instance)
{
if (Plugin.Instance.isBossSpeed)
{
return false;
}
return true;
}
}
[BepInPlugin("NineSols.Yukikaco.plugin", "Nine Sols Cheat Menu Made By Yuki.kaco", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
[StructLayout(LayoutKind.Auto)]
[CompilerGenerated]
private struct <HuanXianTeleport>d__116 : IAsyncStateMachine
{
public int <>1__state;
public AsyncUniTaskMethodBuilder <>t__builder;
public Plugin <>4__this;
private Awaiter <>u__1;
private void MoveNext()
{
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_0130: Unknown result type (might be due to invalid IL or missing references)
//IL_0137: Unknown result type (might be due to invalid IL or missing references)
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0042: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
int num = <>1__state;
Plugin plugin = <>4__this;
try
{
Awaiter awaiter;
UniTask val;
if (num != 0)
{
if (num == 1)
{
awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_00ea;
}
if (plugin.isHuanxianPosSet)
{
goto IL_00f1;
}
plugin.HandleTeleportButtonClick("A7_S2_SectionF_MiniBossFight", Vector3.zero);
val = plugin.WaitForHuanXiaoPos();
awaiter = ((UniTask)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 0);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <HuanXianTeleport>d__116>(ref awaiter, ref this);
return;
}
}
else
{
awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
}
((Awaiter)(ref awaiter)).GetResult();
val = plugin.WaitForEnterGame();
awaiter = ((UniTask)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 1);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <HuanXianTeleport>d__116>(ref awaiter, ref this);
return;
}
goto IL_00ea;
IL_00ea:
((Awaiter)(ref awaiter)).GetResult();
goto IL_00f1;
IL_00f1:
Vector3 val2 = default(Vector3);
((Vector3)(ref val2))..ctor(plugin.HuanxianPos.x - 228f, plugin.HuanxianPos.y - 120f, plugin.HuanxianPos.z);
((BaseUnityPlugin)plugin).Logger.LogInfo((object)$"1111 {val2} {plugin.HuanxianPos}");
plugin.HandleTeleportButtonClick("A7_S2_SectionF_MiniBossFight", val2);
}
catch (Exception exception)
{
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetException(exception);
return;
}
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetResult();
}
void IAsyncStateMachine.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
this.MoveNext();
}
[DebuggerHidden]
private void SetStateMachine(IAsyncStateMachine stateMachine)
{
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine);
}
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
{
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
this.SetStateMachine(stateMachine);
}
}
[StructLayout(LayoutKind.Auto)]
[CompilerGenerated]
private struct <PrePrecoess>d__83 : IAsyncStateMachine
{
public int <>1__state;
public AsyncUniTaskMethodBuilder <>t__builder;
public Plugin <>4__this;
public bool isMemory;
public TeleportPointData teleportPointData;
public string sceneName;
private Awaiter <>u__1;
private void MoveNext()
{
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
//IL_009c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0125: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
int num = <>1__state;
Plugin plugin = <>4__this;
try
{
UniTask val;
Awaiter awaiter;
switch (num)
{
default:
((BaseUnityPlugin)plugin).Logger.LogInfo((object)"PrePrecoessPrePrecoess");
if (isMemory)
{
val = plugin.WaitForSceneLoad("VR_Challenge_Hub");
awaiter = ((UniTask)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 0);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <PrePrecoess>d__83>(ref awaiter, ref this);
return;
}
goto IL_0094;
}
goto IL_009b;
case 0:
awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_0094;
case 1:
awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_00f2;
case 2:
{
awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
break;
}
IL_009b:
val = plugin.WaitForEnterGame();
awaiter = ((UniTask)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 1);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <PrePrecoess>d__83>(ref awaiter, ref this);
return;
}
goto IL_00f2;
IL_00f2:
((Awaiter)(ref awaiter)).GetResult();
SingletonBehaviour<GameCore>.Instance.DiscardUnsavedFlagsAndReset();
if ((Object)(object)teleportPointData != (Object)null)
{
plugin.checkTeleportToSavePoint(teleportPointData);
}
val = plugin.WaitForSceneLoad(sceneName);
awaiter = ((UniTask)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 2);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <PrePrecoess>d__83>(ref awaiter, ref this);
return;
}
break;
IL_0094:
((Awaiter)(ref awaiter)).GetResult();
goto IL_009b;
}
((Awaiter)(ref awaiter)).GetResult();
SingletonBehaviour<GameCore>.Instance.SetReviveSavePoint(teleportPointData);
plugin.checkMultiplier();
plugin.CheckGetAll();
}
catch (Exception exception)
{
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetException(exception);
return;
}
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetResult();
}
void IAsyncStateMachine.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
this.MoveNext();
}
[DebuggerHidden]
private void SetStateMachine(IAsyncStateMachine stateMachine)
{
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine);
}
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
{
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
this.SetStateMachine(stateMachine);
}
}
[StructLayout(LayoutKind.Auto)]
[CompilerGenerated]
private struct <WaitForEnterGame>d__84 : IAsyncStateMachine
{
public int <>1__state;
public AsyncUniTaskMethodBuilder <>t__builder;
private Awaiter <>u__1;
private void MoveNext()
{
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Invalid comparison between Unknown and I4
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0084: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
int num = <>1__state;
try
{
Awaiter awaiter;
if (num != 0)
{
if (num != 1)
{
goto IL_0070;
}
awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_00d2;
}
awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_0069;
IL_0070:
YieldAwaitable val;
if ((Object)(object)SingletonBehaviour<GameCore>.Instance == (Object)null)
{
val = UniTask.Yield();
awaiter = ((YieldAwaitable)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 0);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <WaitForEnterGame>d__84>(ref awaiter, ref this);
return;
}
goto IL_0069;
}
goto IL_00d9;
IL_00d2:
((Awaiter)(ref awaiter)).GetResult();
goto IL_00d9;
IL_00d9:
if ((int)SingletonBehaviour<GameCore>.Instance.currentCoreState != 1)
{
val = UniTask.Yield();
awaiter = ((YieldAwaitable)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 1);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <WaitForEnterGame>d__84>(ref awaiter, ref this);
return;
}
goto IL_00d2;
}
goto end_IL_0007;
IL_0069:
((Awaiter)(ref awaiter)).GetResult();
goto IL_0070;
end_IL_0007:;
}
catch (Exception exception)
{
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetException(exception);
return;
}
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetResult();
}
void IAsyncStateMachine.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
this.MoveNext();
}
[DebuggerHidden]
private void SetStateMachine(IAsyncStateMachine stateMachine)
{
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine);
}
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
{
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
this.SetStateMachine(stateMachine);
}
}
[StructLayout(LayoutKind.Auto)]
[CompilerGenerated]
private struct <WaitForHuanXiaoPos>d__85 : IAsyncStateMachine
{
public int <>1__state;
public AsyncUniTaskMethodBuilder <>t__builder;
public Plugin <>4__this;
private Awaiter <>u__1;
private void MoveNext()
{
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
int num = <>1__state;
Plugin plugin = <>4__this;
try
{
if (num != 0)
{
goto IL_006d;
}
Awaiter awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_0066;
IL_006d:
if (!plugin.isHuanxianPosSet)
{
YieldAwaitable val = UniTask.Yield();
awaiter = ((YieldAwaitable)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 0);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <WaitForHuanXiaoPos>d__85>(ref awaiter, ref this);
return;
}
goto IL_0066;
}
goto end_IL_000e;
IL_0066:
((Awaiter)(ref awaiter)).GetResult();
goto IL_006d;
end_IL_000e:;
}
catch (Exception exception)
{
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetException(exception);
return;
}
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetResult();
}
void IAsyncStateMachine.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
this.MoveNext();
}
[DebuggerHidden]
private void SetStateMachine(IAsyncStateMachine stateMachine)
{
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine);
}
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
{
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
this.SetStateMachine(stateMachine);
}
}
[StructLayout(LayoutKind.Auto)]
[CompilerGenerated]
private struct <WaitForSceneLoad>d__86 : IAsyncStateMachine
{
public int <>1__state;
public AsyncUniTaskMethodBuilder <>t__builder;
public string sceneName;
private Awaiter <>u__1;
private void MoveNext()
{
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: 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)
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
int num = <>1__state;
try
{
if (num != 0)
{
goto IL_0066;
}
Awaiter awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_005f;
IL_0066:
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name != sceneName)
{
YieldAwaitable val = UniTask.Yield();
awaiter = ((YieldAwaitable)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 0);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <WaitForSceneLoad>d__86>(ref awaiter, ref this);
return;
}
goto IL_005f;
}
goto end_IL_0007;
IL_005f:
((Awaiter)(ref awaiter)).GetResult();
goto IL_0066;
end_IL_0007:;
}
catch (Exception exception)
{
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetException(exception);
return;
}
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetResult();
}
void IAsyncStateMachine.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
this.MoveNext();
}
[DebuggerHidden]
private void SetStateMachine(IAsyncStateMachine stateMachine)
{
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine);
}
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
{
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
this.SetStateMachine(stateMachine);
}
}
[StructLayout(LayoutKind.Auto)]
[CompilerGenerated]
private struct <checkMove>d__82 : IAsyncStateMachine
{
public int <>1__state;
public AsyncUniTaskMethodBuilder <>t__builder;
private Awaiter <>u__1;
private void MoveNext()
{
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: 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)
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
int num = <>1__state;
try
{
if (num != 0)
{
goto IL_0066;
}
Awaiter awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_005f;
IL_0066:
if ((Object)(object)Player.i == (Object)null || Player.i.moveVec.x == 0f)
{
YieldAwaitable val = UniTask.Yield();
awaiter = ((YieldAwaitable)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 0);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <checkMove>d__82>(ref awaiter, ref this);
return;
}
goto IL_005f;
}
goto end_IL_0007;
IL_005f:
((Awaiter)(ref awaiter)).GetResult();
goto IL_0066;
end_IL_0007:;
}
catch (Exception exception)
{
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetException(exception);
return;
}
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetResult();
}
void IAsyncStateMachine.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
this.MoveNext();
}
[DebuggerHidden]
private void SetStateMachine(IAsyncStateMachine stateMachine)
{
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine);
}
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
{
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
this.SetStateMachine(stateMachine);
}
}
[StructLayout(LayoutKind.Auto)]
[CompilerGenerated]
private struct <checkVersionStartGame>d__112 : IAsyncStateMachine
{
public int <>1__state;
public AsyncUniTaskMethodBuilder <>t__builder;
public string name;
public Plugin <>4__this;
public TeleportPointData teleportPointData;
private Awaiter <>u__1;
private void MoveNext()
{
//IL_0110: Unknown result type (might be due to invalid IL or missing references)
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
//IL_011d: Unknown result type (might be due to invalid IL or missing references)
//IL_0134: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Unknown result type (might be due to invalid IL or missing references)
//IL_013d: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Unknown result type (might be due to invalid IL or missing references)
//IL_0172: Unknown result type (might be due to invalid IL or missing references)
//IL_0177: Unknown result type (might be due to invalid IL or missing references)
//IL_017f: Unknown result type (might be due to invalid IL or missing references)
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_0157: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
int num = <>1__state;
Plugin plugin = <>4__this;
try
{
_ = 1;
try
{
Awaiter awaiter;
if (num == 0)
{
awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_012c;
}
if (num == 1)
{
awaiter = <>u__1;
<>u__1 = default(Awaiter);
num = (<>1__state = -1);
goto IL_018e;
}
MethodInfo method = typeof(StartMenuLogic).GetMethod("StartMemoryChallenge");
UniTask val;
if (!(method != null))
{
string text = name;
typeof(StartMenuLogic).GetMethod("StartGame").Invoke(SingletonBehaviour<StartMenuLogic>.Instance, new object[1] { text });
((BaseUnityPlugin)plugin).Logger.LogInfo((object)("Successfully called StartGame with scene name1111: " + text));
val = plugin.WaitForSceneLoad(text);
awaiter = ((UniTask)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 0);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <checkVersionStartGame>d__112>(ref awaiter, ref this);
return;
}
goto IL_012c;
}
string text2 = name;
method.Invoke(SingletonBehaviour<StartMenuLogic>.Instance, new object[0]);
((BaseUnityPlugin)plugin).Logger.LogInfo((object)("Successfully called StartGame with scene name2222: " + text2));
plugin.PrePrecoess(name, teleportPointData, isMemory: true);
goto end_IL_0013;
IL_012c:
((Awaiter)(ref awaiter)).GetResult();
val = plugin.WaitForEnterGame();
awaiter = ((UniTask)(ref val)).GetAwaiter();
if (!((Awaiter)(ref awaiter)).IsCompleted)
{
num = (<>1__state = 1);
<>u__1 = awaiter;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).AwaitUnsafeOnCompleted<Awaiter, <checkVersionStartGame>d__112>(ref awaiter, ref this);
return;
}
goto IL_018e;
IL_018e:
((Awaiter)(ref awaiter)).GetResult();
plugin.PrePrecoess(name, teleportPointData);
end_IL_0013:;
}
catch (Exception ex)
{
((BaseUnityPlugin)plugin).Logger.LogError((object)("Error checking or invoking StartGame: " + ex.Message));
}
}
catch (Exception exception)
{
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetException(exception);
return;
}
<>1__state = -2;
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetResult();
}
void IAsyncStateMachine.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
this.MoveNext();
}
[DebuggerHidden]
private void SetStateMachine(IAsyncStateMachine stateMachine)
{
((AsyncUniTaskMethodBuilder)(ref <>t__builder)).SetStateMachine(stateMachine);
}
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
{
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
this.SetStateMachine(stateMachine);
}
}
private static ManualLogSource logger;
private Harmony harmony;
private bool isInit;
private Vector2Int lastScreenSize;
private GUIStyle titleStyle;
private GUIStyle toggleStyle;
private GUIStyle textFieldStyle;
private GUIStyle buttonStyle;
private GUIStyle supportTextStyle;
private float basetitleSize = 24f;
private float baseToggleSize = 24f;
private float baseTextFieldSize = 24f;
private float baseButtonSize = 24f;
private LocalizationManager localizationManager;
private ConfigEntry<KeyCode> MenuToggleKey;
private ConfigEntry<KeyCode> SpeedToggleKey;
private ConfigEntry<KeyCode> FovToggleKey;
private ConfigEntry<KeyCode> MouseTeleportKey;
private ConfigEntry<KeyCode> SkipKey;
private ConfigEntry<KeyCode> saveKey;
private ConfigEntry<KeyCode> loadKey;
private ConfigEntry<string> Language;
public ConfigEntry<bool> isEnableConsole;
private bool showMenu;
private bool hasBossRushVersion;
public bool isFov;
public bool isOneHitKill;
public bool isInvincible;
public bool isGetAll;
public bool isGetAllWithoutActiveSkill;
public bool isSpeed;
public bool isFastLearnSkill;
public bool isAutoHeal;
public bool isInfiniteChi;
public bool isInfinitePotion;
public bool isInfiniteAmmo;
public bool isBossSpeed;
public bool isAttackMult;
public bool isInjeryMult;
public bool isSitAtSavePoint;
public bool isCPU;
private bool previousIsBossSpeed;
private bool previousIsAttackMult;
private bool previousIsInjeryMult;
private bool previousIsCpu;
public float fov = 68f;
public float speed = 2f;
public float bossSpeed = 1f;
public float attackMult = 1f;
public float injeryMult = 1f;
private float previousBossSpeed;
private float previousAttackMult;
private float previousInjeryMult;
private string speedInput = "2";
private string bossSpeedInput = "1";
private string attackMultInput = "1";
private string injeryMultInput = "1";
private Rect windowRect;
private Rect supportRect;
private GameObject attack;
private GameObject attack2;
private GameObject attack3;
public bool showSupportWindow;
public string SupportText = "test";
private bool isShowSupportWindowNoBackGround;
private SaveSlotMetaData data;
private byte[] dataByte;
private string flagJson;
private Vector3 tmpPos;
private Vector2 vel;
private string sceneName;
private Vector3 HuanxianPos = Vector3.zero;
private bool isHuanxianPosSet;
public static Plugin Instance { get; private set; }
private void Awake()
{
//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
//IL_01b1: Expected O, but got Unknown
//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
//IL_01f6: Expected O, but got Unknown
//IL_0252: Unknown result type (might be due to invalid IL or missing references)
//IL_0257: Unknown result type (might be due to invalid IL or missing references)
//IL_0281: Unknown result type (might be due to invalid IL or missing references)
//IL_0286: Unknown result type (might be due to invalid IL or missing references)
RCGLifeCycle.DontDestroyForever(((Component)this).gameObject);
Debug.Log((object)"九日修改器");
Instance = this;
logger = ((BaseUnityPlugin)this).Logger;
MenuToggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Menu", "MenuToggleKey", (KeyCode)284, "Open Cheat Menu ShortCut\n開啟選單快捷鍵\n开启选单热键");
SpeedToggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Menu", "SpeedToggleKey", (KeyCode)285, "Timer ShortCut\n加速快捷鍵\n加速热键");
FovToggleKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Menu", "FOVToggleKey", (KeyCode)286, "FOV ShortCut\nFOV快捷鍵\nFOV热键");
MouseTeleportKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Menu", "MouseTeleportKey", (KeyCode)283, "Mouse Move Character ShortCut\n滑鼠移動快捷鍵\n滑鼠移动热键");
SkipKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Menu", "SkipKey", (KeyCode)306, "Skip ShortCut\n跳過快捷鍵\n跳過热键");
saveKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Menu", "SaveKey", (KeyCode)292, "Save Current State\n儲存當前資料\n暂存当前资料");
loadKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("Menu", "LoadKey", (KeyCode)293, "Load Tmp State\n讀取暫存資料\n读取暂存资料");
isEnableConsole = ((BaseUnityPlugin)this).Config.Bind<bool>("Menu", "isEnableConsole", true, "Is Enable Console? F1 Open Console\n是否開啟控制台 F1開啟控制台\n是否开启控制台 F1开启控制台");
Language = ((BaseUnityPlugin)this).Config.Bind<string>("Menu", "MenuLanguage", "en-us", "Menu Language\n選單語言\n选单语言\nen-us, zh-tw, zh-cn");
localizationManager = new LocalizationManager();
localizationManager.SetLanguage(Language.Value);
Harmony.CreateAndPatchAll(typeof(Patch), (string)null);
harmony = new Harmony("MonsterBasePatcher");
MethodInfo methodInfo = AccessTools.Method(typeof(MonsterBase), "UpdateAnimatorSpeed", (Type[])null, (Type[])null);
if (methodInfo != null)
{
harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(typeof(MonsterBasePatcher), "UpdateAnimatorSpeed", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
((BaseUnityPlugin)this).Logger.LogInfo((object)"UpdateAnimatorSpeed patch applied.");
}
else
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"UpdateAnimatorSpeed method not found. Skipping patch.");
}
float num = (float)Screen.width * 0.6f;
float num2 = (float)Screen.height * 0.92f;
windowRect = new Rect(((float)Screen.width - num) / 2f, ((float)Screen.height - num2) / 2f, num, num2);
supportRect = new Rect(((float)Screen.width - num) / 2f, ((float)Screen.height - num2) / 2f, num, num2 / 6f);
SceneManager.sceneLoaded += OnSceneLoaded;
}
private void Start()
{
previousIsBossSpeed = isBossSpeed;
previousBossSpeed = bossSpeed;
previousIsAttackMult = isAttackMult;
previousAttackMult = attackMult;
previousIsInjeryMult = isInjeryMult;
previousInjeryMult = injeryMult;
previousIsCpu = isCPU;
}
private async void Kanghui(string SceneName, Vector3 teleportPostion, List<string> flags = null)
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
HandleTeleportButtonClick(SceneName, teleportPostion);
if (flags != null)
{
foreach (string flag in flags)
{
ModifyFlag(flag, 1);
}
}
await checkMove();
PlayerAbilityModifyPackApplyAction[] array = Object.FindObjectsOfType<PlayerAbilityModifyPackApplyAction>();
for (int i = 0; i < array.Length; i++)
{
array[i].ExitLevelAndDestroy();
}
}
private async void Jee(string SceneName, Vector3 teleportPostion, List<string> flags = null)
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
HandleTeleportButtonClick(SceneName, teleportPostion);
if (flags != null)
{
foreach (string flag in flags)
{
ModifyFlag(flag, 1);
}
}
await checkMove();
if ((Object)(object)Player.i != (Object)null)
{
Traverse.Create((object)Player.i).Method("UnlockParryJumpKickAbility", Array.Empty<object>()).GetValue();
}
}
private async void PerformActionsAfterTeleport(string SceneName, Vector3 teleportPostion, List<string> flags = null)
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
HandleTeleportButtonClick(SceneName, teleportPostion);
if (flags != null)
{
foreach (string flag in flags)
{
ModifyFlag(flag, 1);
}
}
await checkMove();
try
{
KillAllEnemiesExcept((MonsterLevel)2);
}
catch (Exception arg)
{
((BaseUnityPlugin)this).Logger.LogInfo((object)$"Exp {arg}");
}
}
[AsyncStateMachine(typeof(<checkMove>d__82))]
private UniTask checkMove()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
<checkMove>d__82 <checkMove>d__ = default(<checkMove>d__82);
<checkMove>d__.<>t__builder = AsyncUniTaskMethodBuilder.Create();
<checkMove>d__.<>1__state = -1;
((AsyncUniTaskMethodBuilder)(ref <checkMove>d__.<>t__builder)).Start<<checkMove>d__82>(ref <checkMove>d__);
return ((AsyncUniTaskMethodBuilder)(ref <checkMove>d__.<>t__builder)).Task;
}
[AsyncStateMachine(typeof(<PrePrecoess>d__83))]
private UniTask PrePrecoess(string sceneName, TeleportPointData teleportPointData, bool isMemory = false)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
<PrePrecoess>d__83 <PrePrecoess>d__ = default(<PrePrecoess>d__83);
<PrePrecoess>d__.<>t__builder = AsyncUniTaskMethodBuilder.Create();
<PrePrecoess>d__.<>4__this = this;
<PrePrecoess>d__.sceneName = sceneName;
<PrePrecoess>d__.teleportPointData = teleportPointData;
<PrePrecoess>d__.isMemory = isMemory;
<PrePrecoess>d__.<>1__state = -1;
((AsyncUniTaskMethodBuilder)(ref <PrePrecoess>d__.<>t__builder)).Start<<PrePrecoess>d__83>(ref <PrePrecoess>d__);
return ((AsyncUniTaskMethodBuilder)(ref <PrePrecoess>d__.<>t__builder)).Task;
}
[AsyncStateMachine(typeof(<WaitForEnterGame>d__84))]
private UniTask WaitForEnterGame()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
<WaitForEnterGame>d__84 <WaitForEnterGame>d__ = default(<WaitForEnterGame>d__84);
<WaitForEnterGame>d__.<>t__builder = AsyncUniTaskMethodBuilder.Create();
<WaitForEnterGame>d__.<>1__state = -1;
((AsyncUniTaskMethodBuilder)(ref <WaitForEnterGame>d__.<>t__builder)).Start<<WaitForEnterGame>d__84>(ref <WaitForEnterGame>d__);
return ((AsyncUniTaskMethodBuilder)(ref <WaitForEnterGame>d__.<>t__builder)).Task;
}
[AsyncStateMachine(typeof(<WaitForHuanXiaoPos>d__85))]
private UniTask WaitForHuanXiaoPos()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: 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)
<WaitForHuanXiaoPos>d__85 <WaitForHuanXiaoPos>d__ = default(<WaitForHuanXiaoPos>d__85);
<WaitForHuanXiaoPos>d__.<>t__builder = AsyncUniTaskMethodBuilder.Create();
<WaitForHuanXiaoPos>d__.<>4__this = this;
<WaitForHuanXiaoPos>d__.<>1__state = -1;
((AsyncUniTaskMethodBuilder)(ref <WaitForHuanXiaoPos>d__.<>t__builder)).Start<<WaitForHuanXiaoPos>d__85>(ref <WaitForHuanXiaoPos>d__);
return ((AsyncUniTaskMethodBuilder)(ref <WaitForHuanXiaoPos>d__.<>t__builder)).Task;
}
[AsyncStateMachine(typeof(<WaitForSceneLoad>d__86))]
private UniTask WaitForSceneLoad(string sceneName)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: 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)
<WaitForSceneLoad>d__86 <WaitForSceneLoad>d__ = default(<WaitForSceneLoad>d__86);
<WaitForSceneLoad>d__.<>t__builder = AsyncUniTaskMethodBuilder.Create();
<WaitForSceneLoad>d__.sceneName = sceneName;
<WaitForSceneLoad>d__.<>1__state = -1;
((AsyncUniTaskMethodBuilder)(ref <WaitForSceneLoad>d__.<>t__builder)).Start<<WaitForSceneLoad>d__86>(ref <WaitForSceneLoad>d__);
return ((AsyncUniTaskMethodBuilder)(ref <WaitForSceneLoad>d__.<>t__builder)).Task;
}
private void OnScreenSizeChanged(float width, float height)
{
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
width *= 0.6f;
height *= 0.92f;
windowRect = new Rect(((float)Screen.width - width) / 2f, ((float)Screen.height - height) / 2f, width, height);
supportRect = new Rect(((float)Screen.width - width) / 2f, ((float)Screen.height - height) / 2f, width, height / 6f);
Debug.Log((object)$"Screen size changed to: {width}x{height}");
if (isInit)
{
UpdateGUIStyle();
}
}
private void UpdateGUIStyle()
{
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0085: Expected O, but got Unknown
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Expected O, but got Unknown
float num = Mathf.Min((float)Screen.width / 1920f, (float)Screen.height / 1080f);
int num2 = Mathf.RoundToInt(baseToggleSize * num);
int num3 = Mathf.RoundToInt(baseButtonSize * num);
int fontSize = Mathf.RoundToInt(baseTextFieldSize * num);
int fontSize2 = Mathf.RoundToInt(baseTextFieldSize * num * 2f);
toggleStyle.fontSize = num2;
toggleStyle.padding = new RectOffset(num2 * 2, num2 * 2, num2 / 2, num2 / 2);
textFieldStyle.fontSize = fontSize;
buttonStyle.fontSize = num3;
buttonStyle.padding = new RectOffset(num3 / 3, num3 / 3, num3 / 3, num3 / 3);
titleStyle.fontSize = Mathf.RoundToInt(basetitleSize * num);
supportTextStyle.fontSize = fontSize2;
}
private void OnDestory()
{
Harmony.UnpatchAll();
if (AccessTools.Method(typeof(MonsterBase), "UpdateAnimatorSpeed", (Type[])null, (Type[])null) != null)
{
harmony.UnpatchSelf();
}
SceneManager.sceneLoaded -= OnSceneLoaded;
}
private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
((BaseUnityPlugin)this).Logger.LogInfo((object)("Scene loaded: " + ((Scene)(ref scene)).name));
if (((Scene)(ref scene)).name == "TitleScreenMenu" && Object.op_Implicit((Object)(object)GameObject.Find("MenuLogic/MainMenuLogic/Providers/MenuUIPanel/Button Layout/MainMenuButton_MemoryOfBattle")))
{
hasBossRushVersion = true;
}
if (((Scene)(ref scene)).name == "A7_S2_SectionF_MiniBossFight" && Object.op_Implicit((Object)(object)GameObject.Find("StealthMonster_Flying Teleport Wizard_MiniBoss 幻象區平行宇宙版 Variant")))
{
HuanxianPos = GameObject.Find("StealthMonster_Flying Teleport Wizard_MiniBoss 幻象區平行宇宙版 Variant").GetComponent<MonsterBase>().HomePos;
if (HuanxianPos != Vector3.zero)
{
isHuanxianPosSet = true;
}
}
((BaseUnityPlugin)this).Logger.LogInfo((object)("hasBossRushVersion: " + hasBossRushVersion));
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void CheckScreenSize()
{
if (Screen.width != ((Vector2Int)(ref lastScreenSize)).x || Screen.height != ((Vector2Int)(ref lastScreenSize)).y)
{
((Vector2Int)(ref lastScreenSize)).x = Screen.width;
((Vector2Int)(ref lastScreenSize)).y = Screen.height;
OnScreenSizeChanged(((Vector2Int)(ref lastScreenSize)).x, ((Vector2Int)(ref lastScreenSize)).y);
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void ProcessShortCut()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
if (Input.GetKeyDown(MenuToggleKey.Value))
{
showMenu = !showMenu;
}
if (Input.GetKeyDown(SpeedToggleKey.Value))
{
isSpeed = !isSpeed;
}
if (Input.GetKeyDown(FovToggleKey.Value))
{
isFov = !isFov;
}
if (Input.GetKeyDown(saveKey.Value))
{
SaveCurState();
}
if (Input.GetKeyDown(loadKey.Value))
{
LoadSaveState();
}
if (Input.GetKeyDown(SkipKey.Value))
{
Skip();
}
if (Input.GetKey(MouseTeleportKey.Value))
{
CheatManager instance = SingletonBehaviour<CheatManager>.Instance;
if ((Object)(object)instance != (Object)null && (Object)(object)Player.i != (Object)null)
{
Traverse.Create((object)instance).Method("DropPlayerAtMousePosition", Array.Empty<object>()).GetValue();
}
}
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void TickLogic()
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
if (showMenu || Input.GetKey(MouseTeleportKey.Value))
{
Cursor.visible = true;
Cursor.lockState = (CursorLockMode)0;
}
if (isFov)
{
float num = Input.GetAxis("Mouse ScrollWheel") * 30f;
float num2 = fov - num;
if (num2 > 0f && num2 < 180f)
{
fov = num2;
}
}
TimePauseManager.GlobalSimulationSpeed = ((isSpeed && speed > 0f) ? speed : 1f);
if (isInvincible)
{
if ((Object)(object)Player.i != (Object)null && (Object)(object)Player.i.GetHealth != (Object)null)
{
Player.i.GetHealth.isInvincibleVote.Vote((Object)(object)((Component)Player.i).gameObject, true);
}
}
else if ((Object)(object)Player.i != (Object)null && (Object)(object)Player.i.GetHealth != (Object)null)
{
Player.i.GetHealth.isInvincibleVote.Vote((Object)(object)((Component)Player.i).gameObject, false);
}
if ((Object)(object)Player.i != (Object)null)
{
if (isAutoHeal && (Object)(object)Player.i.health != (Object)null)
{
((Health)Player.i.health).GainFull();
}
if (isInfiniteChi && (Object)(object)Player.i.chiContainer != (Object)null)
{
Player.i.chiContainer.GainFull();
}
if (isInfinitePotion && (Object)(object)Player.i.potion != (Object)null)
{
Player.i.potion.GainFull();
}
if (isInfiniteAmmo && (Object)(object)Player.i.ammo != (Object)null)
{
Player.i.ammo.GainFull();
}
}
if (isBossSpeed != previousIsBossSpeed || bossSpeed != previousBossSpeed)
{
modifyBossSpeed(bossSpeed);
}
previousIsBossSpeed = isBossSpeed;
previousBossSpeed = bossSpeed;
if (isAttackMult != previousIsAttackMult || attackMult != previousInjeryMult)
{
checkMultiplier();
}
previousIsAttackMult = isAttackMult;
previousAttackMult = attackMult;
if (isInjeryMult != previousIsInjeryMult || injeryMult != previousInjeryMult)
{
checkMultiplier();
}
previousIsInjeryMult = isInjeryMult;
previousInjeryMult = injeryMult;
if (isCPU != previousIsCpu)
{
setCpu();
}
previousIsCpu = isCPU;
}
private void setCpu()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)$"CPU {isCPU}");
Player i = Player.i;
if (isCPU)
{
Traverse.Create((object)i.mainAbilities.PlayerMaxJadePowerStat.Stat).Field("BaseValue").SetValue((object)500f);
}
else
{
Traverse.Create((object)i.mainAbilities.PlayerMaxJadePowerStat.Stat).Field("BaseValue").SetValue((object)2f);
}
}
private void checkMultiplier()
{
if (isAttackMult)
{
modifyStat("0_PlayerAttackBaseDamageRatio 主角攻擊的基礎倍率", attackMult);
}
else
{
modifyStat("0_PlayerAttackBaseDamageRatio 主角攻擊的基礎倍率", 1f);
}
if (isInjeryMult)
{
modifyStat("1_PlayerTakeDamageRatio 主角受傷倍率", injeryMult);
}
else
{
modifyStat("1_PlayerTakeDamageRatio 主角受傷倍率", 1f);
}
}
private void modifyStat(string name, float value)
{
if (!((Object)(object)SingletonBehaviour<SaveManager>.Instance == (Object)null) && !((Object)(object)SingletonBehaviour<SaveManager>.Instance.allStatData == (Object)null))
{
SingletonBehaviour<SaveManager>.Instance.allStatData.GetStat(name).Stat.BaseValue = value;
}
}
public void modifyBossSpeed(float speed)
{
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Invalid comparison between Unknown and I4
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Invalid comparison between Unknown and I4
MonsterBase[] array = Object.FindObjectsOfType<MonsterBase>();
foreach (MonsterBase val in array)
{
if (isBossSpeed)
{
FieldInfo fieldInfo = typeof(MonsterBase).GetField("monsterStat") ?? typeof(MonsterBase).GetField("_monsterStat");
if (fieldInfo != null)
{
object? value = fieldInfo.GetValue(val);
MonsterStat val2 = (MonsterStat)((value is MonsterStat) ? value : null);
if ((int)val2.monsterLevel == 3 || (int)val2.monsterLevel == 2)
{
((Actor)val).animator.speed = speed;
}
}
}
else
{
((Actor)val).animator.speed = 1f;
}
}
}
private void KillAllEnemies()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
foreach (MonsterLevel value in Enum.GetValues(typeof(MonsterLevel)))
{
KillAllEnemies(value);
}
}
private void KillAllEnemiesExcept(MonsterLevel killType)
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
foreach (MonsterLevel value in Enum.GetValues(typeof(MonsterLevel)))
{
if (killType != value)
{
KillAllEnemies(value);
}
}
}
private void KillAllEnemies(MonsterLevel killType)
{
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
MonsterBase[] array = Object.FindObjectsOfType<MonsterBase>();
foreach (MonsterBase val in array)
{
bool flag = (Object)(object)val != (Object)null && val.IsAlive() && ((Behaviour)val).isActiveAndEnabled && ((Component)val).gameObject.activeInHierarchy && ((Component)val).gameObject.activeSelf;
FieldInfo fieldInfo = typeof(MonsterBase).GetField("monsterStat") ?? typeof(MonsterBase).GetField("_monsterStat");
if (fieldInfo != null)
{
object? value = fieldInfo.GetValue(val);
MonsterStat val2 = (MonsterStat)((value is MonsterStat) ? value : null);
if ((Object)(object)val2 != (Object)null && val2.monsterLevel == killType && flag)
{
((BaseUnityPlugin)this).Logger.LogInfo((object)$"{((Object)val).name} {val2.monsterLevel}");
val.DieSelfDesctruction();
}
}
else
{
((BaseUnityPlugin)this).Logger.LogWarning((object)"No valid monsterStat field found on MonsterBase.");
}
}
}
private void Update()
{
CheckScreenSize();
ProcessShortCut();
TickLogic();
}
private void PrintFlag(string key)
{
SingletonBehaviour<SaveManager>.Instance.allFlags.FlagDict.TryGetValue(key, out var value);
((ScriptableDataBool)((value is ScriptableDataBool) ? value : null)).CurrentValue = true;
}
private void FullLight()
{
GameObject val = GameObject.Find("SceneCamera/AmplifyLightingSystem/FxCamera");
if ((Object)(object)val != (Object)null)
{
if (val.activeSelf)
{
val.SetActive(false);
}
else
{
val.SetActive(true);
}
Debug.Log((object)"FxCamera GameObject deactivated.");
}
else
{
Debug.LogError((object)"FxCamera GameObject not found.");
}
}
private void OnGUI()
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Expected O, but got Unknown
//IL_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Expected O, but got Unknown
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: Expected O, but got Unknown
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Expected O, but got Unknown
//IL_0168: Unknown result type (might be due to invalid IL or missing references)
//IL_0174: Unknown result type (might be due to invalid IL or missing references)
//IL_0194: Expected O, but got Unknown
//IL_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_0194: Unknown result type (might be due to invalid IL or missing references)
//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
//IL_01f8: Expected O, but got Unknown
//IL_01f3: Unknown result type (might be due to invalid IL or missing references)
//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Expected O, but got Unknown
//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
if (!isInit)
{
titleStyle = new GUIStyle(GUI.skin.window);
toggleStyle = new GUIStyle(GUI.skin.toggle);
textFieldStyle = new GUIStyle(GUI.skin.textField);
buttonStyle = new GUIStyle(GUI.skin.button);
supportTextStyle = new GUIStyle(GUI.skin.label);
float num = Mathf.Min((float)Screen.width / 1920f, (float)Screen.height / 1080f);
int num2 = Mathf.RoundToInt(baseToggleSize * num);
int num3 = Mathf.RoundToInt(baseButtonSize * num);
int fontSize = Mathf.RoundToInt(baseTextFieldSize * num);
int fontSize2 = Mathf.RoundToInt(baseTextFieldSize * num * 2f);
toggleStyle.fontSize = num2;
toggleStyle.padding = new RectOffset(num2 * 2, num2 * 2, num2 / 2, num2 / 2);
textFieldStyle.fontSize = fontSize;
buttonStyle.fontSize = num3;
buttonStyle.padding = new RectOffset(num3 / 3, num3 / 3, num3 / 3, num3 / 3);
titleStyle.fontSize = Mathf.RoundToInt(basetitleSize * num);
supportTextStyle.fontSize = fontSize2;
isInit = true;
}
if (showMenu)
{
windowRect = GUI.Window(156789, windowRect, new WindowFunction(DoMyWindow), localizationManager.GetString("title"), titleStyle);
}
if (showSupportWindow)
{
if (isShowSupportWindowNoBackGround)
{
supportRect = GUI.Window(1354564, supportRect, new WindowFunction(DrawWindow), "", GUIStyle.none);
}
else
{
supportRect = GUI.Window(1299856, supportRect, new WindowFunction(DrawWindow), "Predict to Attack");
}
}
}
private void DrawWindow(int windowID)
{
GUILayout.Label(SupportText, supportTextStyle, Array.Empty<GUILayoutOption>());
GUI.DragWindow();
}
public void DoMyWindow(int windowID)
{
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_05b4: Unknown result type (might be due to invalid IL or missing references)
//IL_05f5: Unknown result type (might be due to invalid IL or missing references)
//IL_0636: Unknown result type (might be due to invalid IL or missing references)
//IL_0677: Unknown result type (might be due to invalid IL or missing references)
//IL_06d3: Unknown result type (might be due to invalid IL or missing references)
//IL_0714: Unknown result type (might be due to invalid IL or missing references)
//IL_0755: Unknown result type (might be due to invalid IL or missing references)
//IL_0797: Unknown result type (might be due to invalid IL or missing references)
//IL_07d8: Unknown result type (might be due to invalid IL or missing references)
//IL_0828: Unknown result type (might be due to invalid IL or missing references)
//IL_0869: Unknown result type (might be due to invalid IL or missing references)
//IL_08aa: Unknown result type (might be due to invalid IL or missing references)
//IL_08eb: Unknown result type (might be due to invalid IL or missing references)
//IL_0963: Unknown result type (might be due to invalid IL or missing references)
//IL_09d1: Unknown result type (might be due to invalid IL or missing references)
//IL_0a13: Unknown result type (might be due to invalid IL or missing references)
//IL_0a8c: Unknown result type (might be due to invalid IL or missing references)
//IL_0adc: Unknown result type (might be due to invalid IL or missing references)
//IL_0b09: Unknown result type (might be due to invalid IL or missing references)
//IL_0b46: Unknown result type (might be due to invalid IL or missing references)
//IL_0b93: Unknown result type (might be due to invalid IL or missing references)
//IL_0c07: Unknown result type (might be due to invalid IL or missing references)
//IL_0c48: Unknown result type (might be due to invalid IL or missing references)
//IL_0c8a: Unknown result type (might be due to invalid IL or missing references)
//IL_0ccb: Unknown result type (might be due to invalid IL or missing references)
//IL_0fb0: Unknown result type (might be due to invalid IL or missing references)
GUILayout.BeginArea(new Rect(10f, 20f, ((Rect)(ref windowRect)).width - 20f, ((Rect)(ref windowRect)).height - 30f));
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
isInvincible = GUILayout.Toggle(isInvincible, localizationManager.GetString("Invincible"), toggleStyle, Array.Empty<GUILayoutOption>());
isOneHitKill = GUILayout.Toggle(isOneHitKill, localizationManager.GetString("OHK"), toggleStyle, Array.Empty<GUILayoutOption>());
isFastLearnSkill = GUILayout.Toggle(isFastLearnSkill, localizationManager.GetString("FastLearnSkill"), toggleStyle, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
isAutoHeal = GUILayout.Toggle(isAutoHeal, localizationManager.GetString("AutoHeal"), toggleStyle, Array.Empty<GUILayoutOption>());
isInfiniteChi = GUILayout.Toggle(isInfiniteChi, localizationManager.GetString("InfiniteChi"), toggleStyle, Array.Empty<GUILayoutOption>());
isInfinitePotion = GUILayout.Toggle(isInfinitePotion, localizationManager.GetString("InfinitePotion"), toggleStyle, Array.Empty<GUILayoutOption>());
isInfiniteAmmo = GUILayout.Toggle(isInfiniteAmmo, localizationManager.GetString("InfiniteAmmo"), toggleStyle, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
isSpeed = GUILayout.Toggle(isSpeed, ShowKey(SpeedToggleKey) + localizationManager.GetString("Timer"), toggleStyle, Array.Empty<GUILayoutOption>());
speedInput = GUILayout.TextField(speedInput, textFieldStyle, Array.Empty<GUILayoutOption>());
float.TryParse(speedInput, out speed);
GUILayout.EndVertical();
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
isFov = GUILayout.Toggle(isFov, ShowKey(FovToggleKey) + localizationManager.GetString("FOV"), toggleStyle, Array.Empty<GUILayoutOption>());
fov = GUILayout.HorizontalSlider(fov, 1f, 180f, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) });
GUILayout.EndVertical();
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
isSitAtSavePoint = GUILayout.Toggle(isSitAtSavePoint, localizationManager.GetString("isSitAtSavePoint"), toggleStyle, Array.Empty<GUILayoutOption>());
isCPU = GUILayout.Toggle(isCPU, localizationManager.GetString("isCPU"), toggleStyle, Array.Empty<GUILayoutOption>());
GUILayout.EndVertical();
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(ShowKey(SkipKey) + localizationManager.GetString("Skip"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
Skip();
}
if (GUILayout.Button(localizationManager.GetString("FullBright"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
FullLight();
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("English"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
Language.Value = "en-us";
localizationManager.SetLanguage(Language.Value);
}
if (GUILayout.Button(localizationManager.GetString("繁體中文"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
Language.Value = "zh-tw";
localizationManager.SetLanguage(Language.Value);
}
if (GUILayout.Button(localizationManager.GetString("简体中文"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
Language.Value = "zh-cn";
localizationManager.SetLanguage(Language.Value);
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("GetAllMax"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
GetAllMax();
}
if (GUILayout.Button(localizationManager.GetString("GetAllMaxWithoutActiveSkill"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
GetAllMaxWithoutActiveSkill();
}
if (GUILayout.Button(localizationManager.GetString("SkillPoint0"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
SingletonBehaviour<GameCore>.Instance.playerGameData.SkillPointLeft = 0;
}
if (GUILayout.Button(localizationManager.GetString("Gold0"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
SingletonBehaviour<GameCore>.Instance.playerGameData.CurrentGold = 0;
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
isGetAll = GUILayout.Toggle(isGetAll, localizationManager.GetString("AutoGetAllMax"), toggleStyle, Array.Empty<GUILayoutOption>());
isGetAllWithoutActiveSkill = GUILayout.Toggle(isGetAllWithoutActiveSkill, localizationManager.GetString("AutoGetAllMaxWithoutActiveSkill"), toggleStyle, Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("A2_S5_BossHorseman_Final"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A2_S5_BossHorseman_Final", new Vector3(-4790f, -2288f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("A3_S5_BossGouMang_Final"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A3_S5_BossGouMang_Final", new Vector3(-4430f, -2288f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("A4_S5_DaoTrapHouse_Final"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A4_S5_DaoTrapHouse_Final", new Vector3(1833f, -3744f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("A5_S5_JieChuanHall"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A5_S5_JieChuanHall", new Vector3(-4784f, -2288f, 0f));
ModifyFlag("c4a79371b6ba3ce47bbdda684236f7b5ItemData", 1);
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("A7_S5_Boss_ButterFly"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A7_S5_Boss_ButterFly", new Vector3(-2640f, -1104f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("A9_S5_風氏"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A9_S5_風氏", new Vector3(-2370f, -1264f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("A10_S5_Boss_Jee"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
Jee("A10_S5_Boss_Jee", new Vector3(-48f, -64f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("A11_S0_Boss_YiGung_回蓬萊"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A11_S0_Boss_YiGung_回蓬萊", new Vector3(-2686f, -1104f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("A11_S0_Boss_YiGung"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A11_S0_Boss_YiGung", new Vector3(-2686f, -1104f, 0f));
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("赤虎-百長"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A1_S2_ConnectionToElevator_Final", new Vector3(1820f, -4432f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("赤虎-魁岩"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A6_S1_AbandonMine_Remake_4wei", new Vector3(5151f, -7488f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("赤虎-炎刃"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A2_S6_LogisticCenter_Final", new Vector3(5030f, -6768f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("赤虎-獵官"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
PerformActionsAfterTeleport("A0_S9_AltarReturned", new Vector3(-95f, -64f, 0f));
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("步衛-角端"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
List<string> flags = new List<string> { "574d3e20-47c5-4841-a21c-121d7806ed6e_c3c3f30fb046d9743aea48eb8f4833bcScriptableDataBool", "ff553e6df36c89644ae08124aaa2913eScriptableDataBool", "5d67c34b-0553-482f-8e4d-dd4c02d0c359_c3c3f30fb046d9743aea48eb8f4833bcScriptableDataBool" };
PerformActionsAfterTeleport("A2_S2_ReactorRight_Final", new Vector3(-4690f, -1968f, 0f), flags);
if ((Object)(object)Player.i != (Object)null)
{
Traverse.Create((object)Player.i).Method("SkipFooMiniGame", Array.Empty<object>()).GetValue();
}
}
if (GUILayout.Button(localizationManager.GetString("步衛-武槍"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
PerformActionsAfterTeleport("A5_S4_CastleMid_Remake_5wei", new Vector3(4430f, -4224f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("影者-水鬼"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A3_S2_GreenHouse_Final", new Vector3(-4530f, -1216f, 0f));
if ((Object)(object)Player.i != (Object)null)
{
Traverse.Create((object)Player.i).Method("UnlockChargedAttack", Array.Empty<object>()).GetValue();
}
ModifyFlag("a4657cbd-5219-45fb-9401-3780b41e8cbe_efdc8e91e5eb76347b87b832ac07330cScriptableDataBool", 1);
}
if (GUILayout.Button(localizationManager.GetString("影者-山鬼"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A1_S3_InnerHumanDisposal_Final", new Vector3(-5590f, -608f, 0f));
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("法使-鐵焰"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A4_S2_RouteToControlRoom_Final", new Vector3(-3950f, -3040f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("法使-幻仙"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HuanXianTeleport();
}
if (GUILayout.Button(localizationManager.GetString("機兵-天守"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A9_S1_Remake_4wei", new Vector3(-3330f, 352f, 0f));
ModifyFlag("a2dba9e5-61cf-453a-8981-efb081fb0b11_4256ef2ec22f942dc9f70607bb00391fScriptableDataBool", 1);
}
if (GUILayout.Button(localizationManager.GetString("魂守-刺行"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A10_S4_HistoryTomb_Left", new Vector3(-690f, -368f, 0f));
ModifyFlag("44bc69bd40a7f6d45a2b8784cc8ebbd1ScriptableDataBool", 1);
ModifyFlag("118f725174ccdf5498af6386d4987482ScriptableDataBool", 1);
ModifyFlag("d7a444315eab0b74fb0ed1e8144edf73ScriptableDataBool", 1);
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("侍衛-隱月"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A6_S3_Tutorial_And_SecretBoss_Remake", new Vector3(5457f, -6288f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("康回"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
Kanghui("A5_S2_Jail_Remake_Final", new Vector3(-464f, -4624f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("刑天"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A4_S3_ControlRoom_Final", new Vector3(-4155f, -5776f, 0f));
}
if (GUILayout.Button(localizationManager.GetString("無頭刑天"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
HandleTeleportButtonClick("A11_SG1_ShinTenRoom", new Vector3(-5827f, -464f, 0f));
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("SupportWindow"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
showSupportWindow = !showSupportWindow;
}
if (GUILayout.Button(localizationManager.GetString("ShowSupportWindowNoBackGround"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
isShowSupportWindowNoBackGround = !isShowSupportWindowNoBackGround;
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
isBossSpeed = GUILayout.Toggle(isBossSpeed, localizationManager.GetString("BossSpeed"), toggleStyle, Array.Empty<GUILayoutOption>());
bossSpeedInput = GUILayout.TextField(bossSpeedInput, textFieldStyle, Array.Empty<GUILayoutOption>());
float.TryParse(bossSpeedInput, out bossSpeed);
GUILayout.EndVertical();
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
isAttackMult = GUILayout.Toggle(isAttackMult, localizationManager.GetString("Attack_Multiplier"), toggleStyle, Array.Empty<GUILayoutOption>());
attackMultInput = GUILayout.TextField(attackMultInput, textFieldStyle, Array.Empty<GUILayoutOption>());
float.TryParse(attackMultInput, out attackMult);
GUILayout.EndVertical();
GUILayout.BeginVertical(Array.Empty<GUILayoutOption>());
isInjeryMult = GUILayout.Toggle(isInjeryMult, localizationManager.GetString("Injury_Multiplier"), toggleStyle, Array.Empty<GUILayoutOption>());
injeryMultInput = GUILayout.TextField(injeryMultInput, textFieldStyle, Array.Empty<GUILayoutOption>());
float.TryParse(injeryMultInput, out injeryMult);
GUILayout.EndVertical();
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("Enable_Jailed_Weak_Status"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
ModifyFlag("df6a9a9f7748f4baba6207afdf10ea31PlayerAbilityScenarioModifyPack", 1);
}
if (GUILayout.Button(localizationManager.GetString("Disable_Jailed_Weak_Status"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
ModifyFlag("df6a9a9f7748f4baba6207afdf10ea31PlayerAbilityScenarioModifyPack", 0);
}
if (GUILayout.Button(ShowKey(saveKey) + localizationManager.GetString("Save_CurState"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
SaveCurState();
}
if (GUILayout.Button(ShowKey(loadKey) + localizationManager.GetString("Load_SaveState"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
LoadSaveState();
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
if (GUILayout.Button(localizationManager.GetString("DiscardFlagsAndReset"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
if ((Object)(object)SingletonBehaviour<GameCore>.Instance != (Object)null)
{
SingletonBehaviour<GameCore>.Instance.DiscardUnsavedFlagsAndReset();
}
Traverse.Create((object)Player.i.potion.potionMaxCountData.Stat).Field("BaseValue").SetValue((object)2f);
Player.i.RestoreEverything();
}
if (GUILayout.Button(localizationManager.GetString("DevModeConfig"), buttonStyle, Array.Empty<GUILayoutOption>()))
{
SingletonBehaviour<SaveManager>.Instance.allFlags.AllFlagAwake((TestMode)1);
SingletonBehaviour<SaveManager>.Instance.allFlags.AllFlagInitStartAndEquip();
}
GUILayout.EndHorizontal();
GUILayout.BeginHorizontal(Array.Empty<GUILayoutOption>());
GUILayout.EndHorizontal();
GUILayout.EndArea();
GUI.DragWindow();
}
private void GetAllMax()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"GetAllMax");
SetAllMaxFlag();
SkillTreeUI val = Object.FindObjectsOfType<SkillTreeUI>(true)[0];
if ((Object)(object)val != (Object)null)
{
SkillNodeUIControlButton[] allSkillNodes = val.allSkillNodes;
foreach (SkillNodeUIControlButton obj in allSkillNodes)
{
obj.pluginCore.SkillAcquired();
((UIControlButton)obj).UpdateView();
obj.pluginCore.UnlockChildrenCheck();
}
}
Player i2 = Player.i;
if ((Object)(object)i2 != (Object)null)
{
Traverse.Create((object)i2).Method("UnlockAll", Array.Empty<object>()).GetValue();
Traverse.Create((object)i2).Method("SkipFooMiniGame", Array.Empty<object>()).GetValue();
Traverse.Create((object)i2).Method("AddSkillPoint", Array.Empty<object>()).GetValue();
Traverse.Create((object)i2).Method("AddMoney", Array.Empty<object>()).GetValue();
Traverse.Create((object)i2).Method("GetAllJades", Array.Empty<object>()).GetValue();
Traverse.Create((object)i2).Method("GetAllJadeSlots", Array.Empty<object>()).GetValue();
Traverse.Create((object)i2.potion.potionMaxCountData.Stat).Field("BaseValue").SetValue((object)8);
Player.i.RestoreEverything();
}
}
private void NotAtSavePoint()
{
}
private void GetAllMaxWithoutActiveSkill()
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"GetAllMaxWithoutActiveSkill");
SetAllMaxFlag();
Player i = Player.i;
if ((Object)(object)i != (Object)null)
{
Traverse.Create((object)i).Method("UnlockAll", Array.Empty<object>()).GetValue();
Traverse.Create((object)i).Method("SkipFooMiniGame", Array.Empty<object>()).GetValue();
Traverse.Create((object)i).Method("AddSkillPoint", Array.Empty<object>()).GetValue();
Traverse.Create((object)i).Method("AddMoney", Array.Empty<object>()).GetValue();
Traverse.Create((object)i).Method("GetAllJades", Array.Empty<object>()).GetValue();
Traverse.Create((object)i).Method("GetAllJadeSlots", Array.Empty<object>()).GetValue();
Traverse.Create((object)i.potion.potionMaxCountData.Stat).Field("BaseValue").SetValue((object)8);
Player.i.RestoreEverything();
}
}
private void SetAllMaxFlag()
{
ModifyFlag("d1e010f02b84fb14fa39a2b44f99a4beItemData", 1);
ModifyFlag("a68fe303d0077264aa66218d3900f0edItemData", 1);
ModifyFlag("b7a97935c391a324b803dc1fa542b769ItemData", 1);
ModifyFlag("2efd376b4493d40fca29f9e3d49669e9PlayerWeaponData", 1);
ModifyFlag("7837bd6bb550641d8a9f30492603c5eePlayerWeaponData", 1);
ModifyFlag("2f7009a00edd57c4fa4332ffcd15396aPlayerWeaponData", 1);
ModifyFlag("9dfa4667af28b6a4da8c443c9814e40dPlayerWeaponData", 1);
ModifyFlag("ef8f7eb3bcd7b444f80d5da539f3b133PlayerWeaponData", 1);
ModifyFlag("b4b36f48e6a6ec849a613f2fdeda1a2dPlayerWeaponData", 1);
ModifyFlag("4b323612d5dc8bd49b3fd4508d7b485bPlayerWeaponData", 1);
ModifyFlag("3949bc0edba197d459f5d2d7f15c72e0PlayerWeaponData", 1);
ModifyFlag("11df21b39de54f9479514d7135be8d57PlayerWeaponData", 1);
ModifyFlag("a9402e3a9e1e04f4488265f1c6d42641PlayerWeaponData", 1);
ModifyFlag("eb5ef12f4ef9e46eeb09809070d21db4PlayerAbilityData", 1);
ModifyFlag("4f3107713e9dd43fc9968aa6579207c9PlayerAbilityData", 1);
ModifyFlag("072576f6cb93e4921b287b4c50140e22PlayerAbilityData", 1);
ModifyFlag("4e9b068d7b812a84b9f1b52efee467acPlayerAbilityData", 1);
ModifyFlag("b11ba30bd3a72eb49ae3d1746fb686b7PlayerAbilityData", 1);
ModifyFlag("d0a9876111d725d4298833323bb082d0PlayerAbilityData", 1);
ModifyFlag("1b8f6278e3ead824e8352349a8f7cb6dPlayerAbilityData", 1);
ModifyFlag("aa396485060a82d4db9ab2a1fb02c429PlayerAbilityData", 1);
ModifyFlag("a2f84651129789d468ad8fde13a54c4fPlayerAbilityData", 1);
ModifyFlag("3c1022c896f9ca44e9c588b76797e3d0PlayerAbilityData", 1);
ModifyFlag("aae70b5ca7663504eb9967182234dc6bPlayerAbilityData", 1);
ModifyFlag("c3e9631e6805c704f8c3fb1d1d60d78fPlayerAbilityData", 1);
ModifyFlag("960072fcea97cb8438297365d3db963cPlayerAbilityData", 1);
ModifyFlag("cb11b23d6a0659f418937331d46de6fcPlayerAbilityData", 1);
ModifyFlag("0c1ddf20ca0b26447895b50183aebae9PlayerAbilityData", 1);
ModifyFlag("89f506003825f404eac747bbb19560ccPlayerAbilityData", 1);
ModifyFlag("075eabd7421b58e43af25cc1c57e79e3PlayerAbilityData", 1);
ModifyFlag("cf5080950d381d843b000c91175434bfPlayerAbilityData", 1);
ModifyFlag("05b87ad6d7c226245b6e917ec21d3416PlayerAbilityData", 1);
ModifyFlag("23168073bb271184b86dc9601f989db3MerchandiseData", 1);
ModifyFlag("8ff1633b861daf549b6ceefe7c2c7a1cMerchandiseData", 1);
ModifyFlag("ab52d2383f0a50c40913616dbd0efe94MerchandiseData", 1);
}
private void ModifyFlag(string key, int value)
{
GameFlagBase value2 = null;
if (key == null || !SingletonBehaviour<SaveManager>.Instance.allFlags.flagDict.TryGetValue(key, out value2))
{
return;
}
bool flag = Convert.ToBoolean(value);
string name = ((object)value2).GetType().Name;
if (name == null)
{
return;
}
switch (name.Length)
{
case 8:
if (name == "ItemData")
{
ItemData val3 = (ItemData)(object)((value2 is ItemData) ? value2 : null);
if (!((Object)(object)val3 == (Object)null) && flag)
{
((GameFlagDescriptable)val3).PlayerPicked();
}
}
break;
case 16:
if (name == "PlayerWeaponData")
{
PlayerWeaponData val6 = (PlayerWeaponData)(object)((value2 is PlayerWeaponData) ? value2 : null);
if (!((Object)(object)val6 == (Object)null) && flag)
{
((GameFlagDescriptable)val6).PlayerPicked();
}
}
break;
case 17:
if (name == "PlayerAbilityData")
{
PlayerAbilityData val2 = (PlayerAbilityData)(object)((value2 is PlayerAbilityData) ? value2 : null);
if (!((Object)(object)val2 == (Object)null) && flag)
{
((GameFlagDescriptable)val2).PlayerPicked();
}
}
break;
case 13:
if (name == "SkillNodeData" && !((Object)(object)((value2 is SkillNodeData) ? value2 : null) == (Object)null))
{
}
break;
case 18:
{
if (!(name == "ScriptableDataBool"))
{
break;
}
ScriptableDataBool val4 = (ScriptableDataBool)(object)((value2 is ScriptableDataBool) ? value2 : null);
((BaseUnityPlugin)this).Logger.LogInfo((object)val4.CurrentValue);
if (!((Object)(object)val4 == (Object)null))
{
if (flag)
{
val4.CurrentValue = true;
}
else
{
val4.CurrentValue = false;
}
}
break;
}
case 31:
{
if (!(name == "PlayerAbilityScenarioModifyPack"))
{
break;
}
PlayerAbilityScenarioModifyPack val5 = (PlayerAbilityScenarioModifyPack)(object)((value2 is PlayerAbilityScenarioModifyPack) ? value2 : null);
((BaseUnityPlugin)this).Logger.LogInfo((object)val5.IsActivated);
if (!((Object)(object)val5 == (Object)null))
{
if (flag)
{
val5.ApplyOverriding((IStatModifierOwner)(object)val5);
}
else
{
val5.RevertApply((IStatModifierOwner)(object)val5);
}
}
break;
}
case 15:
if (name == "MerchandiseData")
{
MerchandiseData val = (MerchandiseData)(object)((value2 is MerchandiseData) ? value2 : null);
((BaseUnityPlugin)this).Logger.LogInfo((object)((GameFlagDescriptable)val).IsAcquired);
if (!((Object)(object)val == (Object)null) && flag)
{
val.item.PlayerPicked();
}
}
break;
}
}
[AsyncStateMachine(typeof(<checkVersionStartGame>d__112))]
private UniTask checkVersionStartGame(string name, TeleportPointData teleportPointData)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
<checkVersionStartGame>d__112 <checkVersionStartGame>d__ = default(<checkVersionStartGame>d__112);
<checkVersionStartGame>d__.<>t__builder = AsyncUniTaskMethodBuilder.Create();
<checkVersionStartGame>d__.<>4__this = this;
<checkVersionStartGame>d__.name = name;
<checkVersionStartGame>d__.teleportPointData = teleportPointData;
<checkVersionStartGame>d__.<>1__state = -1;
((AsyncUniTaskMethodBuilder)(ref <checkVersionStartGame>d__.<>t__builder)).Start<<checkVersionStartGame>d__112>(ref <checkVersionStartGame>d__);
return ((AsyncUniTaskMethodBuilder)(ref <checkVersionStartGame>d__.<>t__builder)).Task;
}
private void PreocessGotoScene(string SceneName, TeleportPointData teleportPointData = null)
{
//IL_0085: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Invalid comparison between Unknown and I4
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
((BaseUnityPlugin)this).Logger.LogInfo((object)"PreocessGotoScene");
if ((Object)(object)Player.i == (Object)null)
{
if ((Object)(object)SingletonBehaviour<StartMenuLogic>.Instance != (Object)null)
{
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name == "TitleScreenMenu")
{
checkVersionStartGame(SceneName, teleportPointData);
((BaseUnityPlugin)this).Logger.LogInfo((object)"PrePrecoess");
}
}
}
else
{
if (!((Object)(object)SingletonBehaviour<GameCore>.Instance != (Object)null))
{
return;
}
((BaseUnityPlugin)this).Logger.LogInfo((object)$"{SingletonBehaviour<GameCore>.Instance} {SingletonBehaviour<GameCore>.Instance.currentCoreState}");
if ((int)SingletonBehaviour<GameCore>.Instance.currentCoreState == 1)
{
if ((Object)(object)teleportPointData == (Object)null)
{
SingletonBehaviour<GameCore>.Instance.GoToScene(SceneName);
}
else
{
checkTeleportToSavePoint(teleportPointData);
SingletonBehaviour<GameCore>.Instance.SetReviveSavePoint(teleportPointData);
}
SingletonBehaviour<GameCore>.Instance.DiscardUnsavedFlagsAndReset();
checkMultiplier();
CheckGetAll();
}
}
}
private void checkTeleportToSavePoint(TeleportPointData teleportPointData)
{
try
{
MethodInfo method = typeof(GameCore).GetMethod("TeleportToSavePoint");
if (method != null)
{
ParameterInfo[] parameters = method.GetParameters();
if (parameters.Length == 2)
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"Invoking old version of TeleportToSavePoint.");
method.Invoke(SingletonBehaviour<GameCore>.Instance, new object[2] { teleportPointData, false });
}
else if (parameters.Length == 3)
{
((BaseUnityPlugin)this).Logger.LogInfo((object)"Invoking new version of TeleportToSavePoint.");
method.Invoke(SingletonBehaviour<GameCore>.Instance, new object[3] { teleportPointData, false, 0f });
}
else
{
((BaseUnityPlugin)this).Logger.LogError((object)"Unexpected parameter count in TeleportToSavePoint method.");
}
}
}
catch (Exception ex)
{
((BaseUnityPlugin)this).Logger.LogError((object)("Error checking or invoking TeleportToSavePoint: " + ex.Message));
}
}
private void CheckGetAll()
{
if (isGetAll)
{
GetAllMax();
}
else if (isGetAllWithoutActiveSkill)
{
GetAllMaxWithoutActiveSkill();
}
}
[AsyncStateMachine(typeof(<HuanXianTeleport>d__116))]
private UniTask HuanXianTeleport()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: 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)
<HuanXianTeleport>d__116 <HuanXianTeleport>d__ = default(<HuanXianTeleport>d__116);
<HuanXianTeleport>d__.<>t__builder = AsyncUniTaskMethodBuilder.Create();
<HuanXianTeleport>d__.<>4__this = this;
<HuanXianTeleport>d__.<>1__state = -1;
((AsyncUniTaskMethodBuilder)(ref <HuanXianTeleport>d__.<>t__builder)).Start<<HuanXianTeleport>d__116>(ref <HuanXianTeleport>d__);
return ((AsyncUniTaskMethodBuilder)(ref <HuanXianTeleport>d__.<>t__builder)).Task;
}
private void HandleTeleportButtonClick(string sceneName, Vector3 teleportPosition)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
TeleportPointData teleportPointData = CreateTeleportPointData(sceneName, teleportPosition);
PreocessGotoScene(sceneName, teleportPointData);
}
private TeleportPointData CreateTeleportPointData(string sceneName, Vector3 position)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
TeleportPointData obj = ScriptableObject.CreateInstance<TeleportPointData>();
obj.sceneName = sceneName;
obj.TeleportPosition = position;
return obj;
}
public static void LogInfo(string message)
{
logger.LogInfo((object)message);
}
public static void LogError(string message)
{
logger.LogError((object)message);
}
private void Skip()
{
foreach (ISkippable item in Object.FindObjectsOfType<MonoBehaviour>().OfType<ISkippable>())
{
try
{
if (item.CanSkip)
{
item.TrySkip();
}
}
catch (Exception ex)
{
Debug.LogError((object)("Error trying to skip item: " + ex.Message));
}
}
}
private string ShowKey(ConfigEntry<KeyCode> code)
{
return "[" + ((ConfigEntryBase)code).BoxedValue.ToString() + "]";
}
private void SaveCurState()
{
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
data = SingletonBehaviour<GameCore>.Instance.playerGameData.SaveMetaData();
dataByte = GameFlagManager.FlagsToBinary(SingletonBehaviour<SaveManager>.Instance.allFlags);
tmpPos = ((Component)Player.i).transform.position;
vel = ((PhysicsMover)Player.i).Velocity;
Scene scene = ((Component)SingletonBehaviour<GameCore>.Instance.gameLevel).gameObject.scene;
sceneName = ((Scene)(ref scene)).name;
}
private void LoadSaveState()
{
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
GameFlagManager.LoadFlagsFromBinarySave(dataByte, SingletonBehaviour<SaveManager>.Instance.allFlags, (TestMode)0);
SingletonBehaviour<SaveManager>.Instance.allFlags.AllFlagInitStartAndEquip();
SingletonBehaviour<GameCore>.Instance.ResetLevel(false);
string text = sceneName;
Scene activeScene = SceneManager.GetActiveScene();
if (text != ((Scene)(ref activeScene)).name)
{
TeleportPointData teleportPointData = CreateTeleportPointData(sceneName, tmpPos);
checkTeleportToSavePoint(teleportPointData);
}
((Component)Player.i).transform.position = tmpPos;
((PhysicsMover)Player.i).Velocity = vel;
}
}