using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Logging; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Totodu4730.PeakToBeachReborn")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.1.0.0")] [assembly: AssemblyInformationalVersion("0.1.0")] [assembly: AssemblyProduct("Totodu4730.PeakToBeachReborn")] [assembly: AssemblyTitle("PeakToBeachReborn")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.1.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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] [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; } } } namespace BepInEx { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Embedded] internal sealed class BepInAutoPluginAttribute : Attribute { public BepInAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace BepInEx.Preloader.Core.Patching { [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] [Conditional("CodeGeneration")] [Embedded] internal sealed class PatcherAutoPluginAttribute : Attribute { public PatcherAutoPluginAttribute(string? id = null, string? name = null, string? version = null) { } } } namespace Microsoft.CodeAnalysis { [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace PeakToBeachReborn { [BepInPlugin("Totodu4730.PeakToBeachReborn", "PeakToBeachReborn", "1.1.1")] public class Plugin : BaseUnityPlugin { private sealed class PhotonEventBridge { private readonly Plugin owner; public PhotonEventBridge(Plugin owner) { this.owner = owner; } public void Handle(T eventData) { owner.HandlePhotonEventObject(eventData); } } internal static ManualLogSource Log = null; private static readonly Vector3 SavedHipStartPosition = new Vector3(16.8f, 1228.7f, 2240.45f); private bool descentModeReady; private bool isCampfireTransitionRunning; private float descentModeReadyAt; private float nextOrbFogKillAt; private bool beachFlareFinaleTriggered; private object? harmonyInstance; private static Plugin? Instance = null; private readonly HashSet triggeredCampfires = new HashSet(); private readonly Dictionary nextFarLitCampfireLogAt = new Dictionary(StringComparer.Ordinal); private readonly HashSet completedCampfirePaths = new HashSet(StringComparer.Ordinal); private bool initialCampfireResetDone; private bool summitBackpackRelocated; private bool summitStartConfirmed; private float nextSummitRecoveryCheckAt; private int summitRecoveryAttempts; private float nextMultiStateLogAt; private float multiStateLogUntil; private bool routeWasActiveAtCharacterLoss; private float localCharacterLostAt = -9999f; private bool respawnRecoveryPending; private float respawnRecoveryAt; private int respawnRecoveryAttempts; private const byte NetworkEventStartDescent = 170; private const byte NetworkEventSegmentChange = 171; private const byte NetworkEventHelicopterRequest = 172; private const byte NetworkEventHelicopterPrepare = 173; private const byte NetworkEventHelicopterActivate = 174; private const byte NetworkEventStartRequest = 175; private const byte NetworkEventKilnSceneStateChunk = 176; private bool photonEventBridgeInstalled; private object? photonEventSource; private EventInfo? photonEventInfo; private object? photonEventBridge; private Delegate? photonEventDelegate; private float nextPhotonBridgeRetryAt; private string photonBridgeLastWaitReason = ""; private bool networkStartSequenceRunning; private bool helicopterNetworkSequenceRunning; private bool peakSequencePreparedForNetwork; private bool autoStartTriggered; private bool hadLocalCharacterLastFrame; private bool transitionBlackout; private float localCharacterReadyAt; private float nextStartRequestAt; private bool descentNetworkStarted; private int networkRunEpoch; private int lastHandledNetworkStartEpoch; private float nextFlareVanillaBlockLogAt; private readonly Dictionary kilnSceneStateChunks = new Dictionary(); private int kilnSceneStateExpectedChunks; private int kilnSceneStateChunkEpoch = -1; private int lastAppliedKilnSceneStateEpoch = -1; private bool forcePhotonMasterForLocalCalderaJump; private bool joinerHostLikeCalderaJumpSucceeded; private bool joinerHostLikeTropicsJumpSucceeded; private bool joinerHostLikeBeachJumpSucceeded; private bool photonMasterGetterPatchInstalled; private readonly Dictionary kilnSoftSuppressedBehaviours = new Dictionary(); private readonly Dictionary kilnSoftSuppressedRenderers = new Dictionary(); private readonly Dictionary kilnSoftSuppressedColliders = new Dictionary(); private readonly Dictionary kilnSoftSuppressedParticles = new Dictionary(); private bool kilnSoftSuppressionActive; private void Awake() { Log = ((BaseUnityPlugin)this).Logger; Instance = this; Log.LogInfo((object)"PeakToBeachReborn chargé !"); PatchFlareActionForBeachFinale(); TryInstallPhotonEventBridge(); } private void OnDestroy() { try { if (photonEventInfo != null && photonEventSource != null && (object)photonEventDelegate != null) { photonEventInfo.GetRemoveMethod(nonPublic: true)?.Invoke(photonEventSource, new object[1] { photonEventDelegate }); } } catch (Exception ex) { Log.LogWarning((object)("Désabonnement EventReceived impossible : " + ex.Message)); } photonEventBridgeInstalled = false; photonEventSource = null; photonEventInfo = null; photonEventBridge = null; photonEventDelegate = null; if (Instance == this) { Instance = null; } } private void OnGUI() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (transitionBlackout) { int depth = GUI.depth; GUI.depth = -10000; GUI.DrawTexture(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), (Texture)(object)Texture2D.blackTexture, (ScaleMode)0); GUI.depth = depth; } } private void Update() { TryInstallPhotonEventBridgeTick(); TrackRunLifecycleForAutoStart(); AutoStartDescentTick(); LogCompactMultiplayerStateTick(); KeepLocalPlayerAtSummitUntilRouteStartsTick(); RecoverLocalRespawnTick(); WatchLitCampfiresForDescentTransition(); KeepOrbFogDisabledTick(); } private void TryInstallPhotonEventBridgeTick() { if (!photonEventBridgeInstalled && !(Time.time < nextPhotonBridgeRetryAt)) { nextPhotonBridgeRetryAt = Time.time + 1f; TryInstallPhotonEventBridge(); } } private void TryInstallPhotonEventBridge() { if (photonEventBridgeInstalled) { return; } try { Type type = FindLoadedType("Photon.Pun.PhotonNetwork"); if (type == null) { LogPhotonBridgeWaitReason("Photon.Pun.PhotonNetwork introuvable"); return; } PropertyInfo property = type.GetProperty("NetworkingClient", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field = type.GetField("NetworkingClient", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); object obj = null; if (property != null) { obj = property.GetValue(null); } else if (field != null) { obj = field.GetValue(null); } if (obj == null) { string text = string.Join(", ", (from member in type.GetMembers(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic) where member.Name.IndexOf("client", StringComparison.OrdinalIgnoreCase) >= 0 || member.Name.IndexOf("network", StringComparison.OrdinalIgnoreCase) >= 0 select $"{member.MemberType}:{member.Name}").Take(20)); LogPhotonBridgeWaitReason("PhotonNetwork.NetworkingClient introuvable/null | candidats=[" + text + "]"); return; } EventInfo eventInfo = FindInstanceEventInHierarchy(obj.GetType(), "EventReceived"); if (eventInfo == null) { LogPhotonBridgeWaitReason("EventReceived introuvable sur " + obj.GetType().FullName); return; } Type eventHandlerType = eventInfo.EventHandlerType; Type type2 = (eventHandlerType?.GetMethod("Invoke"))?.GetParameters().FirstOrDefault()?.ParameterType; if (eventHandlerType == null || type2 == null) { string text2 = ((eventHandlerType != null) ? (eventHandlerType.FullName ?? eventHandlerType.Name) : "null"); LogPhotonBridgeWaitReason("Signature EventReceived illisible | handler=" + text2); return; } Type type3 = typeof(PhotonEventBridge<>).MakeGenericType(type2); object obj2 = Activator.CreateInstance(type3, this); MethodInfo method = type3.GetMethod("Handle", BindingFlags.Instance | BindingFlags.Public); if (obj2 == null || method == null) { LogPhotonBridgeWaitReason("Création PhotonEventBridge runtime impossible"); return; } Delegate obj3 = Delegate.CreateDelegate(eventHandlerType, obj2, method); MethodInfo addMethod = eventInfo.GetAddMethod(nonPublic: true); if (addMethod == null) { LogPhotonBridgeWaitReason("Accessor add_EventReceived introuvable"); return; } addMethod.Invoke(obj, new object[1] { obj3 }); photonEventSource = obj; photonEventInfo = eventInfo; photonEventBridge = obj2; photonEventDelegate = obj3; photonEventBridgeInstalled = true; photonBridgeLastWaitReason = ""; Log.LogInfo((object)$"Photon EventReceived branché pour le mod | sourceType={obj.GetType().FullName} | eventData={type2.FullName} | inRoom={IsPhotonInRoom()} | master={IsPhotonMasterClient()}"); } catch (Exception ex) { LogPhotonBridgeWaitReason("exception " + ex.GetType().Name + " - " + ex.Message); } } private EventInfo? FindInstanceEventInHierarchy(Type type, string eventName) { Type type2 = type; while (type2 != null) { EventInfo eventInfo = type2.GetEvent(eventName, BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (eventInfo != null) { return eventInfo; } type2 = type2.BaseType; } return null; } private void LogPhotonBridgeWaitReason(string reason) { if (!(reason == photonBridgeLastWaitReason)) { photonBridgeLastWaitReason = reason; Log.LogWarning((object)("PHOTON BRIDGE WAIT | " + reason)); } } private bool IsPhotonInRoom() { try { object obj = (FindLoadedType("Photon.Pun.PhotonNetwork")?.GetProperty("InRoom", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic))?.GetValue(null); bool flag = default(bool); int num; if (obj is bool) { flag = (bool)obj; num = 1; } else { num = 0; } return (byte)((uint)num & (flag ? 1u : 0u)) != 0; } catch { return false; } } private bool IsPhotonMasterClient() { try { if (!IsPhotonInRoom()) { return true; } object obj = (FindLoadedType("Photon.Pun.PhotonNetwork")?.GetProperty("IsMasterClient", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic))?.GetValue(null); bool flag = default(bool); int num; if (obj is bool) { flag = (bool)obj; num = 1; } else { num = 0; } return (byte)((uint)num & (flag ? 1u : 0u)) != 0; } catch { return false; } } private object? ReadReflectedMember(object instance, string memberName) { Type type = instance.GetType(); PropertyInfo property = type.GetProperty(memberName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (property != null && property.GetIndexParameters().Length == 0) { return property.GetValue((property.GetMethod != null && property.GetMethod.IsStatic) ? null : instance); } FieldInfo field = type.GetField(memberName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); return field?.GetValue(field.IsStatic ? null : instance); } private bool SetReflectedMember(object instance, string memberName, object value) { try { Type type = instance.GetType(); PropertyInfo property = type.GetProperty(memberName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (property != null && property.CanWrite) { property.SetValue((property.SetMethod != null && property.SetMethod.IsStatic) ? null : instance, value); return true; } FieldInfo field = type.GetField(memberName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { field.SetValue(field.IsStatic ? null : instance, value); return true; } } catch { } return false; } private bool SendPhotonModEvent(byte eventCode, object content, string receiverGroupName) { if (!IsPhotonInRoom()) { return false; } try { Type type = FindLoadedType("Photon.Pun.PhotonNetwork"); if (type == null) { return false; } MethodInfo methodInfo = type.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).FirstOrDefault(delegate(MethodInfo method) { if (method.Name != "RaiseEvent") { return false; } ParameterInfo[] parameters2 = method.GetParameters(); return parameters2.Length == 4 && parameters2[0].ParameterType == typeof(byte); }); if (methodInfo == null) { Log.LogWarning((object)"PhotonNetwork.RaiseEvent(byte, object, RaiseEventOptions, SendOptions) introuvable."); return false; } ParameterInfo[] parameters = methodInfo.GetParameters(); Type parameterType = parameters[2].ParameterType; Type parameterType2 = parameters[3].ParameterType; object obj = Activator.CreateInstance(parameterType); if (obj == null) { return false; } Type type2 = parameterType.GetProperty("Receivers", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.PropertyType ?? parameterType.GetField("Receivers", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.FieldType; if (type2 == null || !type2.IsEnum) { return false; } object value = Enum.Parse(type2, receiverGroupName, ignoreCase: true); if (!SetReflectedMember(obj, "Receivers", value)) { return false; } object obj2 = parameterType2.GetField("SendReliable", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(null) ?? parameterType2.GetProperty("SendReliable", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(null) ?? Activator.CreateInstance(parameterType2); if (obj2 == null) { return false; } SetReflectedMember(obj2, "Reliability", true); object obj3 = methodInfo.Invoke(null, new object[4] { eventCode, content, obj, obj2 }); bool flag = default(bool); int num; if (obj3 is bool) { flag = (bool)obj3; num = ((1 == 0) ? 1 : 0); } else { num = 1; } bool flag2 = (byte)((uint)num | (flag ? 1u : 0u)) != 0; string text = ((eventCode == 176 && content is string text2) ? $"string[{text2.Length}]" : (content?.ToString() ?? "null")); Log.LogInfo((object)$"MOD NET SEND | code={eventCode} | receiver={receiverGroupName} | content={text} | sent={flag2}"); return flag2; } catch (Exception ex) { Log.LogWarning((object)$"SendPhotonModEvent impossible | code={eventCode} | receiver={receiverGroupName} | {ex.GetType().Name} - {ex.Message}"); return false; } } private void HandlePhotonEventObject(object? eventData) { //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) if (eventData == null) { return; } try { object obj = ReadReflectedMember(eventData, "Code"); if (obj == null) { return; } byte b = Convert.ToByte(obj); if (b < 170 || b > 176) { return; } object obj2 = ReadReflectedMember(eventData, "CustomData"); string arg = ((b == 176 && obj2 is string text) ? $"string[{text.Length}]" : (obj2?.ToString() ?? "null")); Log.LogInfo((object)$"MOD NET RECEIVE | code={b} | content={arg} | master={IsPhotonMasterClient()}"); switch (b) { case 170: { int num = ((obj2 == null) ? 1 : Convert.ToInt32(obj2)); if (num <= lastHandledNetworkStartEpoch) { Log.LogInfo((object)$"START_DESCENT ignoré : epoch déjà traité | reçu={num} | dernier={lastHandledNetworkStartEpoch}"); break; } lastHandledNetworkStartEpoch = num; networkRunEpoch = Math.Max(networkRunEpoch, num); if (networkStartSequenceRunning && !descentModeReady) { Log.LogInfo((object)$"START_DESCENT epoch={num} reçu pendant un auto-start local déjà en cours : la séquence existante continue."); descentNetworkStarted = true; autoStartTriggered = true; transitionBlackout = true; break; } descentModeReady = false; isCampfireTransitionRunning = false; beachFlareFinaleTriggered = false; peakSequencePreparedForNetwork = false; helicopterNetworkSequenceRunning = false; triggeredCampfires.Clear(); completedCampfirePaths.Clear(); nextFarLitCampfireLogAt.Clear(); initialCampfireResetDone = false; summitBackpackRelocated = false; summitStartConfirmed = false; summitRecoveryAttempts = 0; respawnRecoveryPending = false; kilnSceneStateChunks.Clear(); kilnSceneStateExpectedChunks = 0; kilnSceneStateChunkEpoch = -1; lastAppliedKilnSceneStateEpoch = -1; joinerHostLikeCalderaJumpSucceeded = false; joinerHostLikeTropicsJumpSucceeded = false; joinerHostLikeBeachJumpSucceeded = false; forcePhotonMasterForLocalCalderaJump = false; autoStartTriggered = true; descentNetworkStarted = true; transitionBlackout = true; networkStartSequenceRunning = false; Log.LogInfo((object)$"START_DESCENT NOUVELLE RUN RÉSEAU | epoch={num} | master={IsPhotonMasterClient()}"); StartDescentModeSequenceLocal(IsPhotonMasterClient(), IsPhotonMasterClient() ? $"PHOTON START_DESCENT MASTER E{num}" : $"PHOTON START_DESCENT CLIENT WAIT VANILLA E{num}"); break; } case 171: if (obj2 != null) { Segment targetSegment = (Segment)(byte)Convert.ToInt32(obj2); StartNetworkSegmentTransition(targetSegment); } break; case 172: if (IsPhotonMasterClient()) { StartMasterHelicopterNetworkSequence("PHOTON HELI_REQUEST"); } break; case 173: beachFlareFinaleTriggered = true; peakSequencePreparedForNetwork = TryPreparePeakSequenceAtBeachForNetwork(); break; case 174: TrySummonPreparedPeakSequenceAtBeachForNetwork("PHOTON HELI_ACTIVATE"); break; case 175: if (IsPhotonMasterClient() && descentNetworkStarted) { Log.LogInfo((object)"START_REQUEST reçu : le Master rediffuse START_DESCENT aux autres clients."); SendPhotonModEvent(170, Math.Max(1, networkRunEpoch), "Others"); } break; case 176: if (!IsPhotonMasterClient()) { HandleKilnSceneStateChunk(obj2); } break; } } catch (Exception ex) { Log.LogWarning((object)("HandlePhotonEventObject erreur : " + ex.Message)); } } private void TrackRunLifecycleForAutoStart() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Invalid comparison between Unknown and I4 //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) bool flag = (Object)(object)Character.localCharacter != (Object)null; if (flag && !hadLocalCharacterLastFrame) { bool flag2 = routeWasActiveAtCharacterLoss && (int)MapHandler.CurrentSegmentNumber == 0 && completedCampfirePaths.Count < 4; bool flag3 = routeWasActiveAtCharacterLoss && Time.time - localCharacterLostAt <= 15f && !flag2; if (flag2) { Log.LogWarning((object)$"NOUVELLE RUN MÊME LOBBY DÉTECTÉE | segment=Beach | completed={completedCampfirePaths.Count} | ancien état route ignoré"); } if (flag3) { networkStartSequenceRunning = false; autoStartTriggered = true; transitionBlackout = true; respawnRecoveryPending = true; respawnRecoveryAt = Time.time + 0.75f; summitStartConfirmed = (int)MapHandler.CurrentSegmentNumber != 4; multiStateLogUntil = Time.time + 20f; nextMultiStateLogAt = 0f; Log.LogWarning((object)$"RESPAWN LOCAL DÉTECTÉ : progression descente conservée | segment={MapHandler.CurrentSegmentNumber} | completed={completedCampfirePaths.Count}"); } else { autoStartTriggered = false; descentNetworkStarted = false; networkStartSequenceRunning = false; descentModeReady = false; beachFlareFinaleTriggered = false; peakSequencePreparedForNetwork = false; helicopterNetworkSequenceRunning = false; triggeredCampfires.Clear(); completedCampfirePaths.Clear(); nextFarLitCampfireLogAt.Clear(); initialCampfireResetDone = false; summitBackpackRelocated = false; summitStartConfirmed = false; summitRecoveryAttempts = 0; respawnRecoveryPending = false; transitionBlackout = true; localCharacterReadyAt = Time.time + 1.25f; nextStartRequestAt = Time.time + 4f; multiStateLogUntil = Time.time + 25f; nextMultiStateLogAt = 0f; Log.LogInfo((object)$"RUN DÉTECTÉE : écran noir actif, auto-start prévu dans 1,25 s | inRoom={IsPhotonInRoom()} | master={IsPhotonMasterClient()} | bridgePhoton={photonEventBridgeInstalled}"); } routeWasActiveAtCharacterLoss = false; } else if (!flag && hadLocalCharacterLastFrame) { bool flag4 = (routeWasActiveAtCharacterLoss = descentModeReady || isCampfireTransitionRunning || completedCampfirePaths.Count > 0 || (autoStartTriggered && (int)MapHandler.CurrentSegmentNumber > 0)); localCharacterLostAt = Time.time; networkStartSequenceRunning = false; transitionBlackout = false; if (flag4) { Log.LogWarning((object)$"Character.localCharacter perdu pendant la route : état conservé pour un éventuel respawn | segment={MapHandler.CurrentSegmentNumber} | completed={completedCampfirePaths.Count}"); } else { autoStartTriggered = false; descentNetworkStarted = false; descentModeReady = false; beachFlareFinaleTriggered = false; peakSequencePreparedForNetwork = false; helicopterNetworkSequenceRunning = false; triggeredCampfires.Clear(); completedCampfirePaths.Clear(); initialCampfireResetDone = false; summitBackpackRelocated = false; summitStartConfirmed = false; respawnRecoveryPending = false; joinerHostLikeCalderaJumpSucceeded = false; joinerHostLikeTropicsJumpSucceeded = false; joinerHostLikeBeachJumpSucceeded = false; forcePhotonMasterForLocalCalderaJump = false; Log.LogInfo((object)"Fin de run / Character.localCharacter disparu hors route : état auto-start réinitialisé."); } } hadLocalCharacterLastFrame = flag; } private void LogCompactMultiplayerStateTick() { //IL_0051: 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_0064: 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_0069: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Character.localCharacter == (Object)null || Time.time > multiStateLogUntil || Time.time < nextMultiStateLogAt) { return; } nextMultiStateLogAt = Time.time + 2f; try { Rigidbody val = FindBodyRigidbody("Hip"); Vector3 position = ((Component)Character.localCharacter).transform.position; Vector3 val2 = (((Object)(object)val != (Object)null) ? val.position : position); Log.LogInfo((object)$"MULTI LOCAL STATE | master={IsPhotonMasterClient()} | bridge={photonEventBridgeInstalled} | segment={MapHandler.CurrentSegmentNumber} | root={position} | hip={val2} | rootHipDist={Vector3.Distance(position, val2):0.00} | ready={descentModeReady} | startRunning={networkStartSequenceRunning} | blackout={transitionBlackout} | completed={completedCampfirePaths.Count}"); } catch (Exception ex) { Log.LogWarning((object)("MULTI LOCAL STATE impossible : " + ex.Message)); } } private bool IsKilnCampfireLocallyReady() { try { return Resources.FindObjectsOfTypeAll().Any((Campfire campfire) => (Object)(object)campfire != (Object)null && ((Component)campfire).gameObject.activeInHierarchy && CampfireMatchesCurrentSegmentForDebug(campfire, (Segment)4)); } catch { return false; } } private void KeepLocalPlayerAtSummitUntilRouteStartsTick() { //IL_0061: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Invalid comparison between Unknown and I4 //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Character.localCharacter == (Object)null || summitStartConfirmed || networkStartSequenceRunning || isCampfireTransitionRunning || respawnRecoveryPending || (!autoStartTriggered && !descentModeReady) || Time.time < nextSummitRecoveryCheckAt) { return; } nextSummitRecoveryCheckAt = Time.time + 0.75f; Segment currentSegmentNumber; try { currentSegmentNumber = MapHandler.CurrentSegmentNumber; } catch { return; } if ((int)currentSegmentNumber != 4 || !IsKilnCampfireLocallyReady()) { return; } Rigidbody val = FindBodyRigidbody("Hip"); if ((Object)(object)val == (Object)null) { return; } if (val.position.y >= 1100f) { summitStartConfirmed = true; Log.LogInfo((object)$"SUMMIT RECOVERY : sommet déjà confirmé localement | hip={val.position} | master={IsPhotonMasterClient()}"); return; } summitRecoveryAttempts++; Log.LogWarning((object)$"SUMMIT RECOVERY #{summitRecoveryAttempts} : joueur local encore en bas du volcan | segment={currentSegmentNumber} | root={((Component)Character.localCharacter).transform.position} | hip={val.position} | master={IsPhotonMasterClient()}"); if (MoveLocalCharacterBodyNetworkAligned(SavedHipStartPosition, $"SUMMIT RECOVERY #{summitRecoveryAttempts}")) { PatchCampfiresForDescent(); if (!initialCampfireResetDone) { ForceResetCampfiresForDescent(); initialCampfireResetDone = true; } DisableRisingHazard(); descentModeReady = true; autoStartTriggered = true; networkStartSequenceRunning = false; summitStartConfirmed = true; transitionBlackout = false; descentModeReadyAt = Time.time; multiStateLogUntil = Time.time + 15f; Rigidbody val2 = FindBodyRigidbody("Hip"); string arg = (((Object)(object)val2 != (Object)null) ? ((object)val2.position/*cast due to .constrained prefix*/).ToString() : "null"); Log.LogInfo((object)$"SUMMIT RECOVERY OK | root={((Component)Character.localCharacter).transform.position} | hip={arg} | segment={MapHandler.CurrentSegmentNumber}"); } } private void RecoverLocalRespawnTick() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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) //IL_0054: Invalid comparison between Unknown and I4 //IL_0068: 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_005b: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015e: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Invalid comparison between Unknown and I4 //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) if (!respawnRecoveryPending || (Object)(object)Character.localCharacter == (Object)null || Time.time < respawnRecoveryAt) { return; } respawnRecoveryAttempts++; Segment currentSegmentNumber; try { currentSegmentNumber = MapHandler.CurrentSegmentNumber; } catch { respawnRecoveryAt = Time.time + 0.5f; return; } Vector3 val; string text; if ((int)currentSegmentNumber == 4) { val = SavedHipStartPosition; text = "sommet TheKiln"; } else { Campfire val2 = FindDebugDescentCampfireForCurrentSegment(currentSegmentNumber); if ((Object)(object)val2 == (Object)null || !((Component)val2).gameObject.activeInHierarchy) { if (respawnRecoveryAttempts < 8) { Log.LogWarning((object)$"RESPAWN RECOVERY attente branche locale | tentative={respawnRecoveryAttempts} | segment={currentSegmentNumber}"); respawnRecoveryAt = Time.time + 0.5f; } else { Log.LogWarning((object)$"RESPAWN RECOVERY abandonné : aucun campfire actif pour {currentSegmentNumber}."); respawnRecoveryPending = false; transitionBlackout = false; } return; } val = ((Component)val2).transform.position + GetSafeDebugOffsetForCampfire(val2); text = GetPath(((Component)val2).transform); } Log.LogWarning((object)$"RESPAWN RECOVERY | tentative={respawnRecoveryAttempts} | segment={currentSegmentNumber} | anchor={text} | targetHip={val}"); if (!MoveLocalCharacterBodyNetworkAligned(val, $"RESPAWN RECOVERY {currentSegmentNumber}")) { respawnRecoveryAt = Time.time + 0.5f; return; } PatchCampfiresForDescent(); if (!initialCampfireResetDone) { ForceResetCampfiresForDescent(); initialCampfireResetDone = true; } DisableRisingHazard(); descentModeReady = true; autoStartTriggered = true; networkStartSequenceRunning = false; respawnRecoveryPending = false; transitionBlackout = false; descentModeReadyAt = Time.time; summitStartConfirmed = (int)currentSegmentNumber == 4; multiStateLogUntil = Time.time + 15f; Rigidbody val3 = FindBodyRigidbody("Hip"); string arg = (((Object)(object)val3 != (Object)null) ? ((object)val3.position/*cast due to .constrained prefix*/).ToString() : "null"); Log.LogInfo((object)$"RESPAWN RECOVERY OK | segment={currentSegmentNumber} | root={((Component)Character.localCharacter).transform.position} | hip={arg}"); } private void AutoStartDescentTick() { if ((Object)(object)Character.localCharacter == (Object)null || descentModeReady || networkStartSequenceRunning || autoStartTriggered || Time.time < localCharacterReadyAt) { return; } bool flag = IsPhotonInRoom(); bool flag2 = IsPhotonMasterClient(); autoStartTriggered = true; transitionBlackout = true; if (!flag) { Log.LogInfo((object)"AUTO START SOLO : lancement local direct vers TheKiln puis TP sommet."); StartDescentModeSequenceLocal(requestKilnJump: true, "AUTO START SOLO"); } else if (flag2) { descentNetworkStarted = true; networkRunEpoch++; lastHandledNetworkStartEpoch = networkRunEpoch; Log.LogInfo((object)$"AUTO START MASTER LOCAL | bridgePhoton={photonEventBridgeInstalled} | epoch={networkRunEpoch} | lancement local immédiat."); if (photonEventBridgeInstalled) { SendPhotonModEvent(170, networkRunEpoch, "Others"); } else { Log.LogWarning((object)"Bridge Photon absent au démarrage : fallback local actif sur chaque client."); } StartDescentModeSequenceLocal(requestKilnJump: true, "AUTO START MASTER LOCAL"); } else { Log.LogInfo((object)$"AUTO START CLIENT LOCAL | bridgePhoton={photonEventBridgeInstalled} | attente de la réplication vanilla TheKiln, puis TP du joueur local."); StartDescentModeSequenceLocal(requestKilnJump: false, "AUTO START CLIENT WAIT VANILLA"); } } private void StartDescentModeSequenceLocal(bool requestKilnJump, string source) { if (descentModeReady && source.IndexOf("PHOTON", StringComparison.OrdinalIgnoreCase) >= 0) { Log.LogInfo((object)("START_DESCENT réseau ignoré : ce client est déjà prêt. source=" + source)); return; } if (networkStartSequenceRunning) { Log.LogWarning((object)("Start descente ignoré : une séquence est déjà en cours. source=" + source)); return; } transitionBlackout = true; if (IsPhotonInRoom() && !IsPhotonMasterClient()) { RestoreJoinerKilnStateForNewRun("START DESCENT | source=" + source); } Log.LogInfo((object)$"Lancement local mode descente | source={source} | requestKilnJump={requestKilnJump}"); descentModeReady = false; isCampfireTransitionRunning = false; beachFlareFinaleTriggered = false; peakSequencePreparedForNetwork = false; helicopterNetworkSequenceRunning = false; triggeredCampfires.Clear(); summitStartConfirmed = false; summitRecoveryAttempts = 0; respawnRecoveryPending = false; networkStartSequenceRunning = true; ((MonoBehaviour)this).StartCoroutine(StartDescentModeCoroutine(requestKilnJump, source)); } private IEnumerator StartDescentModeCoroutine(bool requestKilnJump, string source) { if ((Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)("Aucun Character.localCharacter trouvé. source=" + source)); networkStartSequenceRunning = false; yield break; } Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; bool inRoom = IsPhotonInRoom(); bool isMaster = IsPhotonMasterClient(); if (requestKilnJump && (int)currentSegmentNumber != 4) { if (inRoom && isMaster) { Log.LogInfo((object)$"MASTER : attente de sécurité 2,5 s avant JumpToSegment(TheKiln) | current={currentSegmentNumber}"); yield return (object)new WaitForSeconds(2.5f); if ((Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)"MASTER : Character.localCharacter a disparu pendant le délai de sécurité. Séquence abandonnée."); networkStartSequenceRunning = false; yield break; } } Log.LogInfo((object)$"Chargement AUTHORITATIF de TheKiln | source={source} | current={MapHandler.CurrentSegmentNumber}"); TryJumpToSegment("TheKiln"); Log.LogInfo((object)"Écran noir maintenu pendant l'attente du segment TheKiln..."); yield return ((MonoBehaviour)this).StartCoroutine(WaitForKilnReadyForTeleport(!inRoom || isMaster)); } else if (!requestKilnJump && (int)currentSegmentNumber != 4) { Log.LogInfo((object)$"CLIENT : aucun JumpToSegment local. Attente de la réplication vanilla TheKiln | current={currentSegmentNumber}"); yield return ((MonoBehaviour)this).StartCoroutine(WaitForKilnReadyForTeleport(allowLocalJumpFallback: false)); if ((int)MapHandler.CurrentSegmentNumber != 4) { Log.LogWarning((object)$"CLIENT : TheKiln non reçu après attente. Pas de TP sommet pour éviter une mort/désynchro | current={MapHandler.CurrentSegmentNumber}"); networkStartSequenceRunning = false; autoStartTriggered = false; localCharacterReadyAt = Time.time + 2f; yield break; } } else { Log.LogInfo((object)"Déjà sur TheKiln, courte stabilisation avant TP sommet."); yield return (object)new WaitForSeconds(0.35f); } if ((int)MapHandler.CurrentSegmentNumber != 4) { Log.LogWarning((object)$"TP SOMMET ANNULÉ : segment local={MapHandler.CurrentSegmentNumber}, attendu=TheKiln | source={source}"); networkStartSequenceRunning = false; autoStartTriggered = false; localCharacterReadyAt = Time.time + 2f; yield break; } Log.LogInfo((object)$"TP SOMMET LOCAL SÉCURISÉ | source={source} | segmentAvantTP={MapHandler.CurrentSegmentNumber} | master={IsPhotonMasterClient()}"); bool flag = (summitStartConfirmed = TeleportVisibleBodyToSavedHipPosition()); if (!flag) { Log.LogWarning((object)"TP sommet initial non confirmé : le watchdog SUMMIT RECOVERY reste armé."); } if (flag && (!IsPhotonInRoom() || IsPhotonMasterClient())) { yield return ((MonoBehaviour)this).StartCoroutine(RelocateVanillaBackpackToSummitWhenReady()); } yield return (object)new WaitForSeconds(0.5f); PatchCampfiresForDescent(); yield return (object)new WaitForSeconds(0.2f); if (!initialCampfireResetDone) { ForceResetCampfiresForDescent(); initialCampfireResetDone = true; } yield return (object)new WaitForSeconds(0.2f); DisableRisingHazard(); descentModeReady = true; isCampfireTransitionRunning = false; triggeredCampfires.Clear(); descentModeReadyAt = Time.time; networkStartSequenceRunning = false; Log.LogInfo((object)$"Mode descente prêt LOCAL | source={source} | segment={MapHandler.CurrentSegmentNumber} | inRoom={IsPhotonInRoom()} | master={IsPhotonMasterClient()}"); Log.LogInfo((object)"En multi V2.5 : START_DESCENT est versionné par epoch ; une nouvelle run dans le même lobby purge l'ancien état."); Log.LogInfo((object)"Transitions V2.16 : correctifs V2.11 à V2.15 conservés. Tropics -> Beach utilise maintenant le même JumpToSegment host-like que le host au lieu de GoToSegment + currentSegment forcé."); Log.LogInfo((object)"Build release : raccourcis clavier de debug/test désactivés."); Log.LogInfo((object)"Finale multi : flare -> demande au Master -> préparation PeakSequence sur tous -> activation synchronisée quand le bridge Photon fonctionne."); yield return null; yield return (object)new WaitForSeconds(0.15f); transitionBlackout = false; Log.LogInfo((object)"ÉCRAN NOIR RETIRÉ : le joueur doit maintenant être directement visible au sommet."); } private IEnumerator WaitForKilnReadyForTeleport(bool allowLocalJumpFallback) { float timeoutAt = Time.time + 10f; while (Time.time < timeoutAt) { bool flag = false; try { flag = (int)MapHandler.CurrentSegmentNumber == 4; } catch { } if (flag && IsKilnCampfireLocallyReady()) { Log.LogInfo((object)$"TheKiln prêt localement : segment + campfire Kiln actifs | master={IsPhotonMasterClient()}"); yield return (object)new WaitForSeconds(0.15f); yield break; } yield return (object)new WaitForSeconds(0.1f); } if (allowLocalJumpFallback) { Log.LogWarning((object)$"Timeout attente TheKiln après 10s | current={MapHandler.CurrentSegmentNumber}. Le client autoritaire tente un dernier JumpToSegment local."); } else { Log.LogWarning((object)$"CLIENT FALLBACK RETARDÉ : TheKiln non reçu après 10s | current={MapHandler.CurrentSegmentNumber} | bridge={photonEventBridgeInstalled}. JumpToSegment(TheKiln) LOCAL maintenant."); } string fallbackLabel = (allowLocalJumpFallback ? "FALLBACK AUTORITATIF" : "CLIENT FALLBACK RETARDÉ"); TryJumpToSegment("TheKiln"); float fallbackTimeoutAt = Time.time + 5f; while (Time.time < fallbackTimeoutAt) { bool flag2 = false; try { flag2 = (int)MapHandler.CurrentSegmentNumber == 4; } catch { } if (flag2 && IsKilnCampfireLocallyReady()) { Log.LogInfo((object)(fallbackLabel + " OK : TheKiln + campfire Kiln prêts localement.")); yield return (object)new WaitForSeconds(0.1f); yield break; } yield return (object)new WaitForSeconds(0.1f); } Log.LogWarning((object)$"{fallbackLabel} ÉCHOUÉ | current={MapHandler.CurrentSegmentNumber} | kilnReady={IsKilnCampfireLocallyReady()}"); } private IEnumerator RelocateVanillaBackpackToSummitWhenReady() { if (summitBackpackRelocated) { yield break; } if (IsPhotonInRoom() && !IsPhotonMasterClient()) { Log.LogInfo((object)"SUMMIT BACKPACK : joiner local ignoré, le host déplace l'objet vanilla réseau."); yield break; } Log.LogInfo((object)"========== SUMMIT BACKPACK RELOCATE START =========="); for (int attempt = 1; attempt <= 8; attempt++) { if (TryRelocateVanillaBackpackToSummit(attempt)) { summitBackpackRelocated = true; Log.LogInfo((object)"========== SUMMIT BACKPACK RELOCATE END : OK =========="); yield break; } if (attempt < 8) { yield return (object)new WaitForSeconds(0.25f); } } Log.LogWarning((object)"SUMMIT BACKPACK RELOCATE END : aucun Backpack(Clone) vanilla réseau trouvé après 8 tentatives."); } private bool TryRelocateVanillaBackpackToSummit(int attempt) { //IL_0016: 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_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03c9: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Unknown result type (might be due to invalid IL or missing references) try { Vector3 vanillaBeachBackpackPosition = new Vector3(19.66f, -0.89f, -367.38f); Transform[] source = Resources.FindObjectsOfTypeAll(); List list = (from transform in (from transform in source where (Object)(object)transform != (Object)null where ((Object)transform).name.Equals("Backpack(Clone)", StringComparison.Ordinal) select transform).Where(delegate(Transform transform) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) Scene scene = ((Component)transform).gameObject.scene; return ((Scene)(ref scene)).IsValid(); }) where GetPath(transform).Equals("Backpack(Clone)", StringComparison.Ordinal) orderby HasPhotonViewComponent(transform) descending, ((Component)transform).gameObject.activeInHierarchy descending, Vector3.Distance(transform.position, vanillaBeachBackpackPosition) select transform).ToList(); if (list.Count <= 0) { if (attempt == 1 || attempt == 8) { Log.LogWarning((object)$"SUMMIT BACKPACK introuvable | tentative={attempt}/8 | aucun root exact Backpack(Clone)"); } return false; } Transform val = list[0]; Component val2 = ((IEnumerable)((Component)val).GetComponents()).FirstOrDefault((Func)((Component component) => (Object)(object)component != (Object)null && ((object)component).GetType().FullName == "Photon.Pun.PhotonView")); string text = TryReadBooleanPropertyText(val2, "IsMine"); Log.LogInfo((object)$"SUMMIT BACKPACK FOUND | tentative={attempt}/8 | path={GetPath(val)} | active={((Component)val).gameObject.activeInHierarchy} | pos={val.position} | photonView={(Object)(object)val2 != (Object)null} | isMine={text} | candidats={list.Count}"); Vector3 val3 = SavedHipStartPosition + new Vector3(2.5f, 0f, 1.5f); Vector3 val4 = val3 + new Vector3(0f, 12f, 0f); Vector3 val5 = SavedHipStartPosition + new Vector3(2.5f, -0.3f, 1.5f); RaycastHit[] source2 = Physics.RaycastAll(val4, Vector3.down, 40f); RaycastHit? val6 = (from hit in source2 where (Object)(object)((RaycastHit)(ref hit)).collider != (Object)null where !((RaycastHit)(ref hit)).collider.isTrigger where GetPath(((Component)((RaycastHit)(ref hit)).collider).transform).StartsWith("Map/", StringComparison.Ordinal) orderby ((RaycastHit)(ref hit)).distance select hit).Cast().FirstOrDefault(); if (val6.HasValue) { RaycastHit value = val6.Value; val5 = ((RaycastHit)(ref value)).point + new Vector3(0f, 0.55f, 0f); Log.LogInfo((object)$"SUMMIT BACKPACK GROUND | hit='{((Object)((RaycastHit)(ref value)).collider).name}' | path={GetPath(((Component)((RaycastHit)(ref value)).collider).transform)} | point={((RaycastHit)(ref value)).point} | target={val5}"); } else { Log.LogWarning((object)$"SUMMIT BACKPACK GROUND : aucun collider Map sous la cible. Fallback target={val5}"); } Rigidbody[] componentsInChildren = ((Component)val).GetComponentsInChildren(true); Rigidbody val7 = ((IEnumerable)componentsInChildren).FirstOrDefault((Func)((Rigidbody body) => (Object)(object)body != (Object)null)); Vector3 val8 = (((Object)(object)val7 != (Object)null) ? val7.position : val.position); Vector3 val9 = val5 - val8; Dictionary dictionary = new Dictionary(); Rigidbody[] array = componentsInChildren; foreach (Rigidbody val10 in array) { if (!((Object)(object)val10 == (Object)null)) { dictionary[val10] = val10.position + val9; } } Vector3 position = val.position; val.position += val9; foreach (KeyValuePair item in dictionary) { Rigidbody key = item.Key; Vector3 position2 = (key.position = item.Value); ((Component)key).transform.position = position2; key.linearVelocity = Vector3.zero; key.angularVelocity = Vector3.zero; } Physics.SyncTransforms(); Vector3 val11 = (((Object)(object)val7 != (Object)null) ? val7.position : val.position); bool flag = Vector3.Distance(val11, val5) <= 1.5f; Log.LogInfo((object)$"SUMMIT BACKPACK RELOCATED | ok={flag} | root={position}->{val.position} | anchor={val8}->{val11} | target={val5} | delta={val9} | rigidbodies={componentsInChildren.Length} | isMine={text}"); return flag; } catch (Exception ex) { Log.LogWarning((object)$"TryRelocateVanillaBackpackToSummit erreur | tentative={attempt}/8 | {ex.GetType().Name} - {ex.Message}"); return false; } } private bool HasPhotonViewComponent(Transform transform) { try { return ((Component)transform).GetComponents().Any((Component component) => (Object)(object)component != (Object)null && ((object)component).GetType().FullName == "Photon.Pun.PhotonView"); } catch { return false; } } private string TryReadBooleanPropertyText(object? instance, string propertyName) { if (instance == null) { return "null"; } try { PropertyInfo property = instance.GetType().GetProperty(propertyName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property == null || property.PropertyType != typeof(bool)) { return "unknown"; } return property.GetValue(instance)?.ToString() ?? "null"; } catch { return "error"; } } private bool TeleportVisibleBodyToSavedHipPosition() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)"Téléportation réseau-alignée du corps visible vers la position Hip sauvegardée."); return MoveLocalCharacterBodyNetworkAligned(SavedHipStartPosition, "TP SOMMET NETWORK-ALIGNED"); } private bool MoveLocalCharacterBodyNetworkAligned(Vector3 desiredHip, string reason) { //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) //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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0179: 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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)("NETWORK-ALIGNED TP annulé : Character.localCharacter null | reason=" + reason)); return false; } Rigidbody val = FindBodyRigidbody("Hip"); if ((Object)(object)val == (Object)null) { Log.LogWarning((object)("NETWORK-ALIGNED TP annulé : Rigidbody Hip introuvable | reason=" + reason)); return false; } try { Character localCharacter = Character.localCharacter; Transform transform = ((Component)localCharacter).transform; Vector3 position = transform.position; Vector3 position2 = val.position; Vector3 val2 = desiredHip - position2; Rigidbody[] componentsInChildren = ((Component)localCharacter).GetComponentsInChildren(true); Dictionary dictionary = new Dictionary(); Rigidbody[] array = componentsInChildren; foreach (Rigidbody val3 in array) { if (!((Object)(object)val3 == (Object)null)) { dictionary[val3] = val3.position + val2; } } Vector3 position3 = desiredHip + new Vector3(0f, -0.8f, 0f); transform.position = position3; foreach (KeyValuePair item in dictionary) { Rigidbody key = item.Key; Vector3 position4 = (key.position = item.Value); ((Component)key).transform.position = position4; key.linearVelocity = Vector3.zero; key.angularVelocity = Vector3.zero; } Physics.SyncTransforms(); Rigidbody val4 = FindBodyRigidbody("Hip"); Vector3 val5 = (((Object)(object)val4 != (Object)null) ? val4.position : desiredHip); Log.LogInfo((object)$"NETWORK-ALIGNED TP | reason={reason} | root {position} -> {transform.position} | hip {position2} -> {val5} | rootHipDist={Vector3.Distance(transform.position, val5):0.00} | delta={val2}"); return Vector3.Distance(val5, desiredHip) <= 1.5f; } catch (Exception ex) { Log.LogWarning((object)("NETWORK-ALIGNED TP erreur | reason=" + reason + " | " + ex.GetType().Name + " - " + ex.Message)); return false; } } private void ForceResetCampfiresForDescent() { Log.LogInfo((object)"========== FORCE RESET CAMPFIRES DESCENTE =========="); try { Campfire[] array = Resources.FindObjectsOfTypeAll(); FieldInfo field = typeof(Campfire).GetField("state", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = typeof(Campfire).GetField("fireHasStarted", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field3 = typeof(Campfire).GetField("beenBurningFor", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field4 = typeof(Campfire).GetField("logRoot", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field5 = typeof(Campfire).GetField("enableWhenLit", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field6 = typeof(Campfire).GetField("disableWhenLit", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field == null) { Log.LogWarning((object)"Champ Campfire.state introuvable."); Log.LogInfo((object)"========== FIN FORCE RESET CAMPFIRES DESCENTE =========="); return; } Type fieldType = field.FieldType; Array values = Enum.GetValues(fieldType); foreach (object item in values) { Log.LogInfo((object)$"FireState possible : {item}"); } object bestCampfireResetState = GetBestCampfireResetState(fieldType); if (bestCampfireResetState == null) { Log.LogWarning((object)"Impossible de trouver un FireState de reset."); Log.LogInfo((object)"========== FIN FORCE RESET CAMPFIRES DESCENTE =========="); return; } int num = 0; Campfire[] array2 = array; foreach (Campfire val in array2) { if ((Object)(object)val == (Object)null) { continue; } string path = GetPath(((Component)val).transform); if (!path.StartsWith("Map/")) { continue; } if (completedCampfirePaths.Contains(path)) { Log.LogInfo((object)("RESET CAMPFIRE SKIP COMPLETED | path=" + path)); continue; } object value = field.GetValue(val); field.SetValue(val, bestCampfireResetState); if (field2 != null) { field2.SetValue(val, false); } if (field3 != null) { field3.SetValue(val, 0f); } if (field5 != null) { object? value2 = field5.GetValue(val); GameObject val2 = (GameObject)((value2 is GameObject) ? value2 : null); if ((Object)(object)val2 != (Object)null) { val2.SetActive(false); } } if (field6 != null) { object? value3 = field6.GetValue(val); GameObject val3 = (GameObject)((value3 is GameObject) ? value3 : null); if ((Object)(object)val3 != (Object)null) { val3.SetActive(true); } } if (field4 != null) { object? value4 = field4.GetValue(val); Transform val4 = (Transform)((value4 is Transform) ? value4 : null); if ((Object)(object)val4 != (Object)null) { ((Component)val4).gameObject.SetActive(true); for (int j = 0; j < val4.childCount; j++) { ((Component)val4.GetChild(j)).gameObject.SetActive(true); } } } num++; Log.LogInfo((object)$"RESET CAMPFIRE | name='{((Object)((Component)val).gameObject).name}' | {value} -> {bestCampfireResetState} | active={((Component)val).gameObject.activeInHierarchy} | path={path}"); } Log.LogInfo((object)$"Nombre de campfires force reset : {num}"); } catch (Exception arg) { Log.LogError((object)$"Erreur ForceResetCampfiresForDescent : {arg}"); } Log.LogInfo((object)"========== FIN FORCE RESET CAMPFIRES DESCENTE =========="); } private IEnumerator DumpCampfirePostLightState(Campfire campfire, string path) { yield return (object)new WaitForSeconds(0.2f); DumpSingleCampfireRuntimeState(campfire, path, "T+0.2s"); yield return (object)new WaitForSeconds(0.8f); DumpSingleCampfireRuntimeState(campfire, path, "T+1s"); yield return (object)new WaitForSeconds(2f); DumpSingleCampfireRuntimeState(campfire, path, "T+3s"); } private void DumpSingleCampfireRuntimeState(Campfire campfire, string path, string label) { //IL_01d6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)campfire == (Object)null) { return; } try { FieldInfo field = typeof(Campfire).GetField("state", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = typeof(Campfire).GetField("fireHasStarted", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field3 = typeof(Campfire).GetField("beenBurningFor", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field4 = typeof(Campfire).GetField("enableWhenLit", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field5 = typeof(Campfire).GetField("disableFogFakeMountain", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); object obj = field?.GetValue(campfire); object obj2 = field2?.GetValue(campfire); object obj3 = field3?.GetValue(campfire); object obj4 = field5?.GetValue(campfire); object? obj5 = field4?.GetValue(campfire); GameObject val = (GameObject)((obj5 is GameObject) ? obj5 : null); Transform val2 = null; if ((Object)(object)val != (Object)null) { Transform[] componentsInChildren = val.GetComponentsInChildren(true); val2 = ((IEnumerable)componentsInChildren).FirstOrDefault((Func)((Transform child) => (Object)(object)child != (Object)null && ((Object)child).name.Equals("CookRadius", StringComparison.OrdinalIgnoreCase))); } Log.LogInfo((object)$"CAMPFIRE VANILLA STATE {label} | state={obj} | fireHasStarted={obj2} | burningFor={obj3} | disableFogFakeMountain={obj4} | enableWhenLitSelf={((val != null) ? new bool?(val.activeSelf) : ((bool?)null))} | enableWhenLitHierarchy={((val != null) ? new bool?(val.activeInHierarchy) : ((bool?)null))} | cookRadiusSelf={((val2 != null) ? new bool?(((Component)val2).gameObject.activeSelf) : ((bool?)null))} | cookRadiusHierarchy={((val2 != null) ? new bool?(((Component)val2).gameObject.activeInHierarchy) : ((bool?)null))} | segment={MapHandler.CurrentSegmentNumber} | path={path}"); } catch (Exception ex) { Log.LogWarning((object)("DumpSingleCampfireRuntimeState erreur | " + label + " | path=" + path + " | " + ex.Message)); } } private object? GetBestCampfireResetState(Type fireStateType) { string[] array = new string[6] { "Unlit", "UnlitNoReveal", "Off", "Ready", "Idle", "None" }; string[] array2 = array; foreach (string value in array2) { if (Enum.IsDefined(fireStateType, value)) { return Enum.Parse(fireStateType, value); } } Array values = Enum.GetValues(fireStateType); foreach (object item in values) { string text = item.ToString() ?? ""; if (text != "Spent" && text != "Lit" && text != "Burning") { return item; } } return null; } private Rigidbody? FindBodyRigidbody(string preferredName) { if ((Object)(object)Character.localCharacter == (Object)null) { return null; } Rigidbody[] componentsInChildren = ((Component)Character.localCharacter).GetComponentsInChildren(true); Rigidbody val = ((IEnumerable)componentsInChildren).FirstOrDefault((Func)((Rigidbody rb) => (Object)(object)rb != (Object)null && ((Object)rb).name == preferredName)); if ((Object)(object)val != (Object)null) { return val; } Rigidbody val2 = ((IEnumerable)componentsInChildren).FirstOrDefault((Func)((Rigidbody rb) => (Object)(object)rb != (Object)null && ((Object)rb).name.IndexOf(preferredName, StringComparison.OrdinalIgnoreCase) >= 0)); if ((Object)(object)val2 != (Object)null) { return val2; } return ((IEnumerable)componentsInChildren).FirstOrDefault((Func)((Rigidbody rb) => (Object)(object)rb != (Object)null)); } private void ShiftWholeCharacter(Vector3 delta, string reason) { //IL_002f: 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_0083: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_00ca: 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) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)("Impossible de déplacer : Character.localCharacter null. Raison=" + reason)); return; } Transform transform = ((Component)Character.localCharacter).transform; Vector3 position = transform.position; Rigidbody[] componentsInChildren = ((Component)Character.localCharacter).GetComponentsInChildren(true); Dictionary dictionary = new Dictionary(); Rigidbody[] array = componentsInChildren; foreach (Rigidbody val in array) { if (!((Object)(object)val == (Object)null)) { dictionary[val] = ((Component)val).transform.position; } } transform.position = position + delta; foreach (KeyValuePair item in dictionary) { Rigidbody key = item.Key; Vector3 position2 = (key.position = item.Value + delta); ((Component)key).transform.position = position2; key.linearVelocity = Vector3.zero; key.angularVelocity = Vector3.zero; } Physics.SyncTransforms(); Log.LogInfo((object)$"{reason} : root {position} -> {transform.position}"); LogPlayerPosition(); } private void DisableRisingHazard() { //IL_012e: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)"========== DISABLE RISING HAZARD =========="); try { Fog[] array = Resources.FindObjectsOfTypeAll(); Log.LogInfo((object)$"Nombre de Fog trouvés : {array.Length}"); FieldInfo field = typeof(Fog).GetField("fogHeight", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = typeof(Fog).GetField("fogSpeed", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field3 = typeof(Fog).GetField("FogHeight", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); Fog[] array2 = array; foreach (Fog val in array2) { if (!((Object)(object)val == (Object)null)) { if (field != null) { field.SetValue(val, -9999f); } if (field2 != null) { field2.SetValue(val, 0f); } try { val.RPCA_SyncFog(-9999f); } catch (Exception ex) { Log.LogWarning((object)("RPCA_SyncFog impossible sur " + ((Object)val).name + " : " + ex.Message)); } Log.LogInfo((object)$"Fog patché : name='{((Object)val).name}', active={((Component)val).gameObject.activeInHierarchy}, pos={((Component)val).transform.position}"); } } if (field3 != null) { field3.SetValue(null, -9999); Log.LogInfo((object)"Fog.FogHeight statique mis à -9999."); } } catch (Exception arg) { Log.LogError((object)$"Erreur DisableRisingHazard : {arg}"); } DisableOrbFogHandler(verbose: true); Log.LogInfo((object)"========== FIN DISABLE RISING HAZARD =========="); } private void KeepOrbFogDisabledTick() { if (descentModeReady && !(Time.time < nextOrbFogKillAt)) { nextOrbFogKillAt = Time.time + 0.5f; DisableOrbFogHandler(verbose: false); } } private void DisableOrbFogHandler(bool verbose) { try { Type type = typeof(Character).Assembly.GetType("OrbFogHandler"); if (type == null) { if (verbose) { Log.LogWarning((object)"Type OrbFogHandler introuvable dans Assembly-CSharp."); } return; } Object[] array = Resources.FindObjectsOfTypeAll(type); if (verbose) { Log.LogInfo((object)$"OrbFogHandler trouvés : {array.Length}"); } int num = 0; Object[] array2 = array; foreach (Object val in array2) { if (!(val == (Object)null)) { Type type2 = ((object)val).GetType(); Component val2 = (Component)(object)((val is Component) ? val : null); string path = ((val2 != null) ? GetPath(val2.transform) : val.name); num += SetFieldIfExists(type2, val, "speed", 0f, verbose, path); num += SetFieldIfExists(type2, val, "maxWaitTime", 999999f, verbose, path); num += SetFieldIfExists(type2, val, "currentWaitTime", 0f, verbose, path); num += SetFieldIfExists(type2, val, "currentSize", 999999f, verbose, path); num += SetFieldIfExists(type2, val, "isMoving", false, verbose, path); num += SetFieldIfExists(type2, val, "PlayersAreResting", false, verbose, path); num += ForceOrbFogOriginsSize(type2, val, 999999f, verbose, path); TryInvokeOrbFogSync(type2, val, 999999f, moving: false, verbose, path); if (verbose) { DumpOrbFogFields(type2, val, path); } } } if (verbose) { Log.LogInfo((object)$"OrbFogHandler anti-fog appliqué. Changements={num}"); } } catch (Exception arg) { if (verbose) { Log.LogError((object)$"Erreur DisableOrbFogHandler : {arg}"); } } } private int SetFieldIfExists(Type type, object instance, string fieldName, object value, bool verbose, string path) { FieldInfo field = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (field == null) { return 0; } try { object obj = (field.IsStatic ? null : instance); object value2 = field.GetValue(obj); object obj2 = value; if (field.FieldType == typeof(float) && value is int num) { obj2 = (float)num; } else if (field.FieldType == typeof(int) && value is float num2) { obj2 = (int)num2; } else if (field.FieldType == typeof(double) && value is float num3) { obj2 = (double)num3; } else { if (field.FieldType != value.GetType() && field.FieldType.IsEnum) { return 0; } if (field.FieldType != value.GetType() && !field.FieldType.IsAssignableFrom(value.GetType())) { return 0; } } field.SetValue(obj, obj2); if (verbose) { Log.LogInfo((object)$"OrbFog SET | {fieldName}: {value2} -> {obj2} | path={path}"); } return 1; } catch (Exception ex) { if (verbose) { Log.LogWarning((object)("OrbFog SET impossible | " + fieldName + " | path=" + path + " | " + ex.Message)); } return 0; } } private int ForceOrbFogOriginsSize(Type type, object instance, float size, bool verbose, string path) { FieldInfo field = type.GetField("origins", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (field == null) { return 0; } try { object value = field.GetValue(field.IsStatic ? null : instance); if (value == null) { return 0; } int num = 0; if (value is Array array) { for (int i = 0; i < array.Length; i++) { object value2 = array.GetValue(i); if (value2 == null) { continue; } FieldInfo field2 = value2.GetType().GetField("size", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (!(field2 == null)) { object value3 = field2.GetValue(field2.IsStatic ? null : value2); field2.SetValue(field2.IsStatic ? null : value2, size); array.SetValue(value2, i); num++; if (verbose) { Log.LogInfo((object)$"OrbFog origins[{i}].size : {value3} -> {size} | path={path}"); } } } } else if (value is IList list) { for (int j = 0; j < list.Count; j++) { object obj = list[j]; if (obj == null) { continue; } FieldInfo field3 = obj.GetType().GetField("size", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (!(field3 == null)) { object value4 = field3.GetValue(field3.IsStatic ? null : obj); field3.SetValue(field3.IsStatic ? null : obj, size); list[j] = obj; num++; if (verbose) { Log.LogInfo((object)$"OrbFog origins[{j}].size : {value4} -> {size} | path={path}"); } } } } return num; } catch (Exception ex) { if (verbose) { Log.LogWarning((object)("OrbFog origins.size impossible | path=" + path + " | " + ex.Message)); } return 0; } } private void TryInvokeOrbFogSync(Type type, object instance, float size, bool moving, bool verbose, string path) { try { MethodInfo method = type.GetMethod("RPCA_SyncFog", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { return; } ParameterInfo[] parameters = method.GetParameters(); if (parameters.Length == 2) { method.Invoke(method.IsStatic ? null : instance, new object[2] { size, moving }); if (verbose) { Log.LogInfo((object)$"OrbFog RPCA_SyncFog({size}, {moving}) invoqué | path={path}"); } } } catch (Exception ex) { if (verbose) { Log.LogWarning((object)("OrbFog RPCA_SyncFog impossible | path=" + path + " | " + ex.Message)); } } } private void DumpOrbFogFields(Type type, object instance, string path) { string[] array = new string[8] { "currentID", "currentSize", "speed", "maxWaitTime", "currentWaitTime", "isMoving", "PlayersAreResting", "syncCounter" }; string[] array2 = array; foreach (string text in array2) { FieldInfo field = type.GetField(text, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (!(field == null)) { try { object value = field.GetValue(field.IsStatic ? null : instance); Log.LogInfo((object)$"OrbFog FIELD | {text}={value} | path={path}"); } catch { } } } } private void PatchCampfiresForDescent() { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: 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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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) Log.LogInfo((object)"========== PATCH CAMPFIRES DESCENTE =========="); try { Campfire[] array = Resources.FindObjectsOfTypeAll(); FieldInfo field = typeof(Campfire).GetField("advanceToSegment", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field == null) { Log.LogWarning((object)"Champ Campfire.advanceToSegment introuvable."); Log.LogInfo((object)"========== FIN PATCH CAMPFIRES DESCENTE =========="); return; } int num = 0; Campfire[] array2 = array; foreach (Campfire val in array2) { if ((Object)(object)val == (Object)null) { continue; } Segment? forcedDescentTargetForCampfire = GetForcedDescentTargetForCampfire(val); if (forcedDescentTargetForCampfire.HasValue) { Segment val2 = ((field.GetValue(val) is Segment val3) ? val3 : forcedDescentTargetForCampfire.Value); Segment value = forcedDescentTargetForCampfire.Value; field.SetValue(val, value); if (val2 != value) { num++; } Log.LogInfo((object)$"PATCH | name='{((Object)((Component)val).gameObject).name}' | {val2} -> {value} | active={((Component)val).gameObject.activeInHierarchy} | pos={((Component)val).transform.position} | path={GetPath(((Component)val).transform)}"); } } Log.LogInfo((object)$"Nombre de campfires patchés ou confirmés : {num}"); } catch (Exception arg) { Log.LogError((object)$"Erreur PatchCampfiresForDescent : {arg}"); } Log.LogInfo((object)"========== FIN PATCH CAMPFIRES DESCENTE =========="); } private Segment? GetForcedDescentTargetForCampfire(Campfire campfire) { string path = GetPath(((Component)campfire).transform); if (!path.StartsWith("Map/")) { return null; } if (path.Contains("Biome_4") || path.Contains("Volcano_Campfire") || ((Object)((Component)campfire).gameObject).name.Contains("Kiln")) { return (Segment)3; } if (path.Contains("Biome_3") || path.Contains("Desert_Campfire") || path.Contains("Snow_Campfire") || path.Contains("Mesa")) { return (Segment)2; } if (path.Contains("Biome_2") || path.Contains("Roots_Campfire") || path.Contains("Roots")) { return (Segment)1; } if (path.Contains("Beach_Campfire") || path.Contains("crashed plane")) { return (Segment)0; } return null; } private float GetNearestActiveCharacterDistanceToPosition(Vector3 position, out string nearestCharacterName, out int activeCharacterCount) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) nearestCharacterName = "none"; activeCharacterCount = 0; float num = float.PositiveInfinity; try { Character[] array = Resources.FindObjectsOfTypeAll(); Character[] array2 = array; foreach (Character val in array2) { if ((Object)(object)val == (Object)null || !((Component)val).gameObject.activeInHierarchy) { continue; } activeCharacterCount++; Vector3 position2 = ((Component)val).transform.position; Rigidbody[] componentsInChildren = ((Component)val).GetComponentsInChildren(true); Rigidbody val2 = ((IEnumerable)componentsInChildren).FirstOrDefault((Func)((Rigidbody rb) => (Object)(object)rb != (Object)null && ((Object)rb).name.Equals("Hip", StringComparison.Ordinal))); if ((Object)(object)val2 == (Object)null) { val2 = ((IEnumerable)componentsInChildren).FirstOrDefault((Func)((Rigidbody rb) => (Object)(object)rb != (Object)null && ((Object)rb).name.IndexOf("Hip", StringComparison.OrdinalIgnoreCase) >= 0)); } if ((Object)(object)val2 != (Object)null) { position2 = val2.position; } float num2 = Vector3.Distance(position2, position); if (!(num2 >= num)) { num = num2; string text = ((val == Character.localCharacter) ? " LOCAL" : " REMOTE"); nearestCharacterName = ((Object)((Component)val).gameObject).name + text; } } } catch (Exception ex) { Log.LogWarning((object)("GetNearestActiveCharacterDistanceToPosition erreur : " + ex.GetType().Name + " - " + ex.Message)); } return num; } private void ResetExpectedCampfireForCurrentSegmentIfStale(string source) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: 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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) try { Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Campfire val = FindDebugDescentCampfireForCurrentSegment(currentSegmentNumber); if ((Object)(object)val == (Object)null) { Log.LogWarning((object)$"EXPECTED CAMPFIRE RESET SKIP | source={source} | current={currentSegmentNumber} | campfire=null"); return; } string path = GetPath(((Component)val).transform); if (completedCampfirePaths.Contains(path)) { Log.LogInfo((object)$"EXPECTED CAMPFIRE RESET SKIP COMPLETED | source={source} | current={currentSegmentNumber} | path={path}"); return; } string nearestCharacterName; int activeCharacterCount; float nearestActiveCharacterDistanceToPosition = GetNearestActiveCharacterDistanceToPosition(((Component)val).transform.position, out nearestCharacterName, out activeCharacterCount); if (activeCharacterCount > 0 && nearestActiveCharacterDistanceToPosition <= 18f) { Log.LogInfo((object)$"EXPECTED CAMPFIRE RESET SKIP PLAYER NEAR | source={source} | current={currentSegmentNumber} | path={path} | nearestPlayer={nearestCharacterName} | distanceNearest={nearestActiveCharacterDistanceToPosition:0.00}"); return; } FieldInfo field = typeof(Campfire).GetField("state", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = typeof(Campfire).GetField("fireHasStarted", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field3 = typeof(Campfire).GetField("beenBurningFor", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field4 = typeof(Campfire).GetField("logRoot", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field5 = typeof(Campfire).GetField("enableWhenLit", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field6 = typeof(Campfire).GetField("disableWhenLit", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field == null) { Log.LogWarning((object)$"EXPECTED CAMPFIRE RESET SKIP | source={source} | current={currentSegmentNumber} | path={path} | stateField=null"); return; } string text = field.GetValue(val)?.ToString() ?? "null"; object obj = field2?.GetValue(val); bool flag = default(bool); int num; if (obj is bool) { flag = (bool)obj; num = 1; } else { num = 0; } bool flag2 = (byte)((uint)num & (flag ? 1u : 0u)) != 0; float num2 = ((field3?.GetValue(val) is float num3) ? num3 : 0f); object? obj2 = field5?.GetValue(val); GameObject val2 = (GameObject)((obj2 is GameObject) ? obj2 : null); object? obj3 = field6?.GetValue(val); GameObject val3 = (GameObject)((obj3 is GameObject) ? obj3 : null); object? obj4 = field4?.GetValue(val); Transform val4 = (Transform)((obj4 is Transform) ? obj4 : null); bool flag3 = (Object)(object)val4 != (Object)null && ((Component)val4).gameObject.activeSelf; if (!(text == "Lit" || text == "Spent" || flag2) && !(num2 > 0f) && (!((Object)(object)val2 != (Object)null) || !val2.activeSelf) && flag3) { Log.LogInfo((object)$"EXPECTED CAMPFIRE READY | source={source} | current={currentSegmentNumber} | path={path} | state={text} | fireHasStarted={flag2} | logsVisible={flag3}"); return; } object bestCampfireResetState = GetBestCampfireResetState(field.FieldType); if (bestCampfireResetState == null) { Log.LogWarning((object)$"EXPECTED CAMPFIRE RESET SKIP | source={source} | current={currentSegmentNumber} | path={path} | resetState=null"); return; } field.SetValue(val, bestCampfireResetState); if (field2 != null) { field2.SetValue(val, false); } if (field3 != null) { field3.SetValue(val, 0f); } if ((Object)(object)val2 != (Object)null) { val2.SetActive(false); } if ((Object)(object)val3 != (Object)null) { val3.SetActive(true); } if ((Object)(object)val4 != (Object)null) { ((Component)val4).gameObject.SetActive(true); for (int i = 0; i < val4.childCount; i++) { ((Component)val4.GetChild(i)).gameObject.SetActive(true); } } triggeredCampfires.Remove(((Object)val).GetInstanceID()); nextFarLitCampfireLogAt.Remove(path); Physics.SyncTransforms(); object value = field.GetValue(val); obj = field2?.GetValue(val); bool flag4 = default(bool); int num4; if (obj is bool) { flag4 = (bool)obj; num4 = 1; } else { num4 = 0; } bool flag5 = (byte)((uint)num4 & (flag4 ? 1u : 0u)) != 0; bool flag6 = (Object)(object)val4 != (Object)null && ((Component)val4).gameObject.activeSelf; Log.LogWarning((object)string.Format("EXPECTED CAMPFIRE RESET | source={0} | current={1} | path={2} | state={3}->{4} | fireHasStarted={5}->{6} | burningFor={7:0.00}->0 | enableWhenLit={8} | disableWhenLit={9} | logsVisible={10}->{11} | nearestPlayer={12} | distanceNearest={13:0.00} | activeCharacters={14}", source, currentSegmentNumber, path, text, value, flag2, flag5, num2, ((Object)(object)val2 != (Object)null) ? val2.activeSelf.ToString() : "null", ((Object)(object)val3 != (Object)null) ? val3.activeSelf.ToString() : "null", flag3, flag6, nearestCharacterName, nearestActiveCharacterDistanceToPosition, activeCharacterCount)); } catch (Exception ex) { Log.LogWarning((object)("ResetExpectedCampfireForCurrentSegmentIfStale erreur | source=" + source + " | " + ex.GetType().Name + " - " + ex.Message)); } } private void WatchLitCampfiresForDescentTransition() { //IL_00c3: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) if (!descentModeReady || isCampfireTransitionRunning || Time.time < descentModeReadyAt + 2f) { return; } bool flag = IsPhotonInRoom(); bool flag2 = flag && photonEventBridgeInstalled; if ((flag2 && !IsPhotonMasterClient()) || (Object)(object)Character.localCharacter == (Object)null) { return; } FieldInfo field = typeof(Campfire).GetField("state", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = typeof(Campfire).GetField("advanceToSegment", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (field == null || field2 == null) { return; } Rigidbody val = FindBodyRigidbody("Hip"); Vector3 val2 = (((Object)(object)val != (Object)null) ? ((Component)val).transform.position : ((Component)Character.localCharacter).transform.position); Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Campfire[] array = Resources.FindObjectsOfTypeAll(); Campfire[] array2 = array; foreach (Campfire val3 in array2) { if ((Object)(object)val3 == (Object)null || !((Component)val3).gameObject.activeInHierarchy) { continue; } string path = GetPath(((Component)val3).transform); if (!path.StartsWith("Map/") || !CampfireMatchesCurrentSegmentForDebug(val3, currentSegmentNumber)) { continue; } float num = Vector3.Distance(val2, ((Component)val3).transform.position); string text = field.GetValue(val3)?.ToString() ?? "null"; if (text != "Lit") { continue; } string nearestCharacterName; int activeCharacterCount; float nearestActiveCharacterDistanceToPosition = GetNearestActiveCharacterDistanceToPosition(((Component)val3).transform.position, out nearestCharacterName, out activeCharacterCount); float num2 = (flag ? 18f : 15f); if (activeCharacterCount <= 0 || nearestActiveCharacterDistanceToPosition > num2) { if (!nextFarLitCampfireLogAt.TryGetValue(path, out var value) || Time.time >= value) { nextFarLitCampfireLogAt[path] = Time.time + 3f; Log.LogWarning((object)$"FEU LIT IGNORÉ : aucun joueur proche | path={path} | current={currentSegmentNumber} | distanceMaster={num:0.00} | nearestPlayer={nearestCharacterName} | distanceNearest={nearestActiveCharacterDistanceToPosition:0.00} | activeCharacters={activeCharacterCount} | limite={num2:0.00}"); } continue; } object value2 = field2.GetValue(val3); if (value2 == null) { continue; } Segment val4 = (Segment)value2; if (val4 == currentSegmentNumber) { continue; } int instanceID = ((Object)val3).GetInstanceID(); if (!completedCampfirePaths.Contains(path) && !triggeredCampfires.Contains(instanceID)) { triggeredCampfires.Add(instanceID); completedCampfirePaths.Add(path); ((MonoBehaviour)this).StartCoroutine(DumpCampfirePostLightState(val3, path)); multiStateLogUntil = Time.time + 15f; Log.LogInfo((object)$"FEU ALLUMÉ DÉTECTÉ | path={path} | current={currentSegmentNumber} | target={val4} | distanceMaster={num:0.00} | nearestPlayer={nearestCharacterName} | distanceNearest={nearestActiveCharacterDistanceToPosition:0.00} | activeCharacters={activeCharacterCount} | inRoom={flag} | master={IsPhotonMasterClient()} | completed={completedCampfirePaths.Count}"); if (flag2 && IsPhotonMasterClient()) { SendPhotonModEvent(171, Convert.ToInt32(val4), "Others"); } else if (flag && !photonEventBridgeInstalled) { Log.LogWarning((object)$"FALLBACK MULTI CAMPFIRE : bridge Photon absent, transition locale vers {val4}."); } ((MonoBehaviour)this).StartCoroutine(DoCampfireDescentTransition(val4)); break; } } } private void StartNetworkSegmentTransition(Segment targetSegment) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Invalid comparison between Unknown and I4 //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Invalid comparison between Unknown and I4 //IL_0086: 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) if (isCampfireTransitionRunning) { Log.LogWarning((object)$"SEGMENT_CHANGE ignoré : transition locale déjà en cours | target={targetSegment}"); return; } Log.LogInfo((object)$"SEGMENT_CHANGE réseau accepté | current={MapHandler.CurrentSegmentNumber} | target={targetSegment} | master={IsPhotonMasterClient()}"); if (IsPhotonInRoom() && !IsPhotonMasterClient()) { if ((int)targetSegment == 3) { ((MonoBehaviour)this).StartCoroutine(ApplyRemoteCalderaHostLikeJump()); } else if ((int)targetSegment == 1) { ((MonoBehaviour)this).StartCoroutine(ApplyRemoteTropicsHostLikeJump()); } else if ((int)targetSegment == 0) { ((MonoBehaviour)this).StartCoroutine(ApplyRemoteBeachHostLikeJump()); } else { ((MonoBehaviour)this).StartCoroutine(ApplyRemoteSegmentTransitionWithLocalGoTo(targetSegment)); } } else { ((MonoBehaviour)this).StartCoroutine(DoCampfireDescentTransition(targetSegment)); } } private IEnumerator ApplyRemoteCalderaHostLikeJump() { isCampfireTransitionRunning = true; transitionBlackout = true; Segment beforeSegment = MapHandler.CurrentSegmentNumber; Campfire val = FindSourceCampfireForTargetSegment((Segment)3); string text = (((Object)(object)val != (Object)null) ? GetPath(((Component)val).transform) : "null"); if ((Object)(object)val != (Object)null) { completedCampfirePaths.Add(text); } Rigidbody val2 = FindBodyRigidbody("Hip"); Vector3 hipBefore = (((Object)(object)val2 != (Object)null) ? val2.position : (((Object)(object)val != (Object)null) ? (((Component)val).transform.position + new Vector3(1.5f, 2.2f, 0f)) : Vector3.zero)); bool realMasterBefore = IsPhotonMasterClient(); joinerHostLikeCalderaJumpSucceeded = false; Log.LogWarning((object)$"REMOTE CALDERA HOST-LIKE START | before={beforeSegment} | source={text} | hipBefore={hipBefore} | masterRéel={realMasterBefore} | photonMasterPatch={photonMasterGetterPatchInstalled}"); yield return (object)new WaitForSeconds(1f); bool jumpThrew = false; forcePhotonMasterForLocalCalderaJump = true; try { Log.LogWarning((object)$"REMOTE CALDERA HOST-LIKE JUMP | appel EXACT MapHandler.JumpToSegment(Caldera) | masterRéelAvant={realMasterBefore} | spoofMaster=True | currentAvant={MapHandler.CurrentSegmentNumber}"); MapHandler.JumpToSegment((Segment)3); Log.LogInfo((object)"REMOTE CALDERA HOST-LIKE JUMP terminé sans exception."); } catch (Exception ex) { jumpThrew = true; Log.LogWarning((object)("REMOTE CALDERA HOST-LIKE JUMP exception tolérée : " + ex.GetType().Name + " - " + ex.Message)); } finally { forcePhotonMasterForLocalCalderaJump = false; } yield return (object)new WaitForSeconds(1.25f); Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Transform val3 = FindExactTransformByPath("Map/Biome_4/Volcano/Caldera_Segment"); Transform val4 = FindExactTransformByPath("Map/Biome_4/Volcano/Volcano_Segment"); bool flag = (Object)(object)val3 != (Object)null && ((Component)val3).gameObject.activeInHierarchy; bool flag2 = (Object)(object)val4 != (Object)null && ((Component)val4).gameObject.activeInHierarchy; joinerHostLikeCalderaJumpSucceeded = (int)currentSegmentNumber == 3 && flag && !flag2; Log.LogWarning((object)$"REMOTE CALDERA HOST-LIKE RESULT | after={currentSegmentNumber} | target=Caldera | calderaActive={flag} | volcanoActive={flag2} | jumpThrew={jumpThrew} | success={joinerHostLikeCalderaJumpSucceeded} | character={(Object)(object)Character.localCharacter != (Object)null}"); if ((Object)(object)Character.localCharacter == (Object)null) { float characterWaitUntil = Time.time + 8f; Log.LogWarning((object)"REMOTE CALDERA HOST-LIKE : Character local absent après Jump, attente de reconstruction locale."); while (Time.time < characterWaitUntil && (Object)(object)Character.localCharacter == (Object)null) { yield return (object)new WaitForSeconds(0.1f); } } if ((Object)(object)Character.localCharacter != (Object)null) { Rigidbody val5 = FindBodyRigidbody("Hip"); if ((Object)(object)val5 == (Object)null || Vector3.Distance(val5.position, hipBefore) > 80f) { bool flag3 = MoveLocalCharacterBodyNetworkAligned(hipBefore, "V2.11 JOINER HOST-LIKE CALDERA RECOVERY"); respawnRecoveryPending = false; Log.LogWarning((object)$"REMOTE CALDERA HOST-LIKE BODY RECOVERY | needed=True | recovered={flag3} | targetHip={hipBefore}"); } else { respawnRecoveryPending = false; Log.LogInfo((object)("REMOTE CALDERA HOST-LIKE BODY RECOVERY | needed=False | hip=" + (((Object)(object)val5 != (Object)null) ? ((object)val5.position/*cast due to .constrained prefix*/).ToString() : "null"))); } } if (joinerHostLikeCalderaJumpSucceeded) { lastAppliedKilnSceneStateEpoch = Math.Max(lastAppliedKilnSceneStateEpoch, Math.Max(1, lastHandledNetworkStartEpoch)); Log.LogWarning((object)"REMOTE CALDERA HOST-LIKE SUCCESS | Caldera_Segment ON / Volcano_Segment OFF reproduits via le même JumpToSegment que le host ; snapshot 176 ignoré pour cette run."); } else { Log.LogWarning((object)"REMOTE CALDERA HOST-LIKE : état host non reproduit. Le snapshot 176 reste disponible comme fallback/diagnostic."); } PatchCampfiresForDescent(); ResetExpectedCampfireForCurrentSegmentIfStale($"JOINER HOST-LIKE ENTER {MapHandler.CurrentSegmentNumber}"); yield return (object)new WaitForSeconds(0.2f); Log.LogInfo((object)$"CAMPFIRE MEMORY LOCK | completed={completedCampfirePaths.Count} | aucun passage forcé en Spent"); DisableRisingHazard(); triggeredCampfires.Clear(); descentModeReadyAt = Time.time; isCampfireTransitionRunning = false; transitionBlackout = false; Rigidbody val6 = FindBodyRigidbody("Hip"); Log.LogWarning((object)string.Format("REMOTE CALDERA HOST-LIKE END | before={0} | current={1} | success={2} | hip={3} | character={4}", beforeSegment, MapHandler.CurrentSegmentNumber, joinerHostLikeCalderaJumpSucceeded, ((Object)(object)val6 != (Object)null) ? ((object)val6.position/*cast due to .constrained prefix*/).ToString() : "null", (Object)(object)Character.localCharacter != (Object)null)); } private IEnumerator ApplyRemoteTropicsHostLikeJump() { isCampfireTransitionRunning = true; transitionBlackout = true; Segment beforeSegment = MapHandler.CurrentSegmentNumber; Campfire val = FindSourceCampfireForTargetSegment((Segment)1); string text = (((Object)(object)val != (Object)null) ? GetPath(((Component)val).transform) : "null"); if ((Object)(object)val != (Object)null) { completedCampfirePaths.Add(text); } Rigidbody val2 = FindBodyRigidbody("Hip"); Vector3 hipBefore = (((Object)(object)val2 != (Object)null) ? val2.position : (((Object)(object)val != (Object)null) ? (((Component)val).transform.position + new Vector3(1.5f, 2.2f, 0f)) : Vector3.zero)); bool realMasterBefore = IsPhotonMasterClient(); joinerHostLikeTropicsJumpSucceeded = false; Log.LogWarning((object)$"REMOTE TROPICS HOST-LIKE START | before={beforeSegment} | source={text} | hipBefore={hipBefore} | masterRéel={realMasterBefore} | photonMasterPatch={photonMasterGetterPatchInstalled}"); yield return (object)new WaitForSeconds(1f); bool jumpThrew = false; forcePhotonMasterForLocalCalderaJump = true; try { Log.LogWarning((object)$"REMOTE TROPICS HOST-LIKE JUMP | appel EXACT MapHandler.JumpToSegment(Tropics) | masterRéelAvant={realMasterBefore} | spoofMaster=True | currentAvant={MapHandler.CurrentSegmentNumber}"); MapHandler.JumpToSegment((Segment)1); Log.LogInfo((object)"REMOTE TROPICS HOST-LIKE JUMP terminé sans exception."); } catch (Exception ex) { jumpThrew = true; Log.LogWarning((object)("REMOTE TROPICS HOST-LIKE JUMP exception tolérée : " + ex.GetType().Name + " - " + ex.Message)); } finally { forcePhotonMasterForLocalCalderaJump = false; } yield return (object)new WaitForSeconds(1.25f); Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Transform val3 = FindExactTransformByPath("Map/Biome_2/Tropics"); Transform val4 = FindExactTransformByPath("Map/Biome_2/Roots"); bool flag = (Object)(object)val3 != (Object)null && ((Component)val3).gameObject.activeSelf; bool flag2 = (Object)(object)val3 != (Object)null && ((Component)val3).gameObject.activeInHierarchy; bool flag3 = (Object)(object)val4 != (Object)null && ((Component)val4).gameObject.activeSelf; bool flag4 = (Object)(object)val4 != (Object)null && ((Component)val4).gameObject.activeInHierarchy; int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; if ((Object)(object)val3 != (Object)null) { Renderer[] componentsInChildren = ((Component)val3).GetComponentsInChildren(true); Collider[] componentsInChildren2 = ((Component)val3).GetComponentsInChildren(true); num2 = componentsInChildren.Length; num4 = componentsInChildren2.Length; num = componentsInChildren.Count((Renderer renderer) => (Object)(object)renderer != (Object)null && renderer.enabled && ((Component)renderer).gameObject.activeInHierarchy); num3 = componentsInChildren2.Count((Collider collider) => (Object)(object)collider != (Object)null && collider.enabled && ((Component)collider).gameObject.activeInHierarchy); } joinerHostLikeTropicsJumpSucceeded = (int)currentSegmentNumber == 1; Log.LogWarning((object)$"REMOTE TROPICS HOST-LIKE RESULT | after={currentSegmentNumber} | target=Tropics | tropicsSelf={flag} | tropicsHierarchy={flag2} | rootsSelf={flag3} | rootsHierarchy={flag4} | renderers={num}/{num2} | colliders={num3}/{num4} | jumpThrew={jumpThrew} | success={joinerHostLikeTropicsJumpSucceeded} | character={(Object)(object)Character.localCharacter != (Object)null}"); if ((Object)(object)Character.localCharacter == (Object)null) { float characterWaitUntil = Time.time + 8f; Log.LogWarning((object)"REMOTE TROPICS HOST-LIKE : Character local absent après Jump, attente de reconstruction locale."); while (Time.time < characterWaitUntil && (Object)(object)Character.localCharacter == (Object)null) { yield return (object)new WaitForSeconds(0.1f); } } if ((Object)(object)Character.localCharacter != (Object)null) { Rigidbody val5 = FindBodyRigidbody("Hip"); if ((Object)(object)val5 == (Object)null || Vector3.Distance(val5.position, hipBefore) > 80f) { bool flag5 = MoveLocalCharacterBodyNetworkAligned(hipBefore, "V2.15 JOINER HOST-LIKE TROPICS RECOVERY"); respawnRecoveryPending = false; Log.LogWarning((object)$"REMOTE TROPICS HOST-LIKE BODY RECOVERY | needed=True | recovered={flag5} | targetHip={hipBefore}"); } else { respawnRecoveryPending = false; Log.LogInfo((object)("REMOTE TROPICS HOST-LIKE BODY RECOVERY | needed=False | hip=" + (((Object)(object)val5 != (Object)null) ? ((object)val5.position/*cast due to .constrained prefix*/).ToString() : "null"))); } } if (joinerHostLikeTropicsJumpSucceeded) { Log.LogWarning((object)"REMOTE TROPICS HOST-LIKE SUCCESS | le joiner a exécuté le même JumpToSegment(Tropics) que le host ; aucun force-field currentSegment ni activation générique du root Tropics n'est appliqué."); } else { Log.LogWarning((object)"REMOTE TROPICS HOST-LIKE FAILED | la vraie bascule Tropics n'a pas été confirmée. Aucun faux succès par simple currentSegment forcé."); } PatchCampfiresForDescent(); ResetExpectedCampfireForCurrentSegmentIfStale($"JOINER HOST-LIKE ENTER {MapHandler.CurrentSegmentNumber}"); yield return (object)new WaitForSeconds(0.2f); Log.LogInfo((object)$"CAMPFIRE MEMORY LOCK | completed={completedCampfirePaths.Count} | aucun passage forcé en Spent"); DisableRisingHazard(); triggeredCampfires.Clear(); descentModeReadyAt = Time.time; isCampfireTransitionRunning = false; transitionBlackout = false; Rigidbody val6 = FindBodyRigidbody("Hip"); Log.LogWarning((object)string.Format("REMOTE TROPICS HOST-LIKE END | before={0} | current={1} | success={2} | hip={3} | character={4}", beforeSegment, MapHandler.CurrentSegmentNumber, joinerHostLikeTropicsJumpSucceeded, ((Object)(object)val6 != (Object)null) ? ((object)val6.position/*cast due to .constrained prefix*/).ToString() : "null", (Object)(object)Character.localCharacter != (Object)null)); } private IEnumerator ApplyRemoteBeachHostLikeJump() { isCampfireTransitionRunning = true; transitionBlackout = true; Segment beforeSegment = MapHandler.CurrentSegmentNumber; Campfire val = FindSourceCampfireForTargetSegment((Segment)0); string text = (((Object)(object)val != (Object)null) ? GetPath(((Component)val).transform) : "null"); if ((Object)(object)val != (Object)null) { completedCampfirePaths.Add(text); } Rigidbody val2 = FindBodyRigidbody("Hip"); Vector3 hipBefore = (((Object)(object)val2 != (Object)null) ? val2.position : (((Object)(object)val != (Object)null) ? (((Component)val).transform.position + new Vector3(1.5f, 2.2f, 0f)) : Vector3.zero)); bool realMasterBefore = IsPhotonMasterClient(); joinerHostLikeBeachJumpSucceeded = false; Log.LogWarning((object)$"REMOTE BEACH HOST-LIKE START | before={beforeSegment} | source={text} | hipBefore={hipBefore} | masterRéel={realMasterBefore} | photonMasterPatch={photonMasterGetterPatchInstalled}"); yield return (object)new WaitForSeconds(1f); bool jumpThrew = false; forcePhotonMasterForLocalCalderaJump = true; try { Log.LogWarning((object)$"REMOTE BEACH HOST-LIKE JUMP | appel EXACT MapHandler.JumpToSegment(Beach) | masterRéelAvant={realMasterBefore} | spoofMaster=True | currentAvant={MapHandler.CurrentSegmentNumber}"); MapHandler.JumpToSegment((Segment)0); Log.LogInfo((object)"REMOTE BEACH HOST-LIKE JUMP terminé sans exception."); } catch (Exception ex) { jumpThrew = true; Log.LogWarning((object)("REMOTE BEACH HOST-LIKE JUMP exception tolérée : " + ex.GetType().Name + " - " + ex.Message)); } finally { forcePhotonMasterForLocalCalderaJump = false; } yield return (object)new WaitForSeconds(1.25f); Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Transform val3 = FindExactTransformByPath("Map/Biome_1/Beach"); Transform val4 = FindExactTransformByPath("Map/Biome_1/Beach/Beach_Segment"); bool flag = (Object)(object)val3 != (Object)null && ((Component)val3).gameObject.activeSelf; bool flag2 = (Object)(object)val3 != (Object)null && ((Component)val3).gameObject.activeInHierarchy; bool flag3 = (Object)(object)val4 != (Object)null && ((Component)val4).gameObject.activeSelf; bool flag4 = (Object)(object)val4 != (Object)null && ((Component)val4).gameObject.activeInHierarchy; int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; if ((Object)(object)val3 != (Object)null) { Renderer[] componentsInChildren = ((Component)val3).GetComponentsInChildren(true); Collider[] componentsInChildren2 = ((Component)val3).GetComponentsInChildren(true); num2 = componentsInChildren.Length; num4 = componentsInChildren2.Length; num = componentsInChildren.Count((Renderer renderer) => (Object)(object)renderer != (Object)null && renderer.enabled && ((Component)renderer).gameObject.activeInHierarchy); num3 = componentsInChildren2.Count((Collider collider) => (Object)(object)collider != (Object)null && collider.enabled && ((Component)collider).gameObject.activeInHierarchy); } joinerHostLikeBeachJumpSucceeded = (int)currentSegmentNumber == 0; Log.LogWarning((object)$"REMOTE BEACH HOST-LIKE RESULT | after={currentSegmentNumber} | target=Beach | beachSelf={flag} | beachHierarchy={flag2} | beachSegmentSelf={flag3} | beachSegmentHierarchy={flag4} | renderers={num}/{num2} | colliders={num3}/{num4} | jumpThrew={jumpThrew} | success={joinerHostLikeBeachJumpSucceeded} | character={(Object)(object)Character.localCharacter != (Object)null}"); if ((Object)(object)Character.localCharacter == (Object)null) { float characterWaitUntil = Time.time + 8f; Log.LogWarning((object)"REMOTE BEACH HOST-LIKE : Character local absent après Jump, attente de reconstruction locale."); while (Time.time < characterWaitUntil && (Object)(object)Character.localCharacter == (Object)null) { yield return (object)new WaitForSeconds(0.1f); } } if ((Object)(object)Character.localCharacter != (Object)null) { Rigidbody val5 = FindBodyRigidbody("Hip"); if ((Object)(object)val5 == (Object)null || Vector3.Distance(val5.position, hipBefore) > 80f) { bool flag5 = MoveLocalCharacterBodyNetworkAligned(hipBefore, "V2.16 JOINER HOST-LIKE BEACH RECOVERY"); respawnRecoveryPending = false; Log.LogWarning((object)$"REMOTE BEACH HOST-LIKE BODY RECOVERY | needed=True | recovered={flag5} | targetHip={hipBefore}"); } else { respawnRecoveryPending = false; Log.LogInfo((object)("REMOTE BEACH HOST-LIKE BODY RECOVERY | needed=False | hip=" + (((Object)(object)val5 != (Object)null) ? ((object)val5.position/*cast due to .constrained prefix*/).ToString() : "null"))); } } if (joinerHostLikeBeachJumpSucceeded) { Log.LogWarning((object)"REMOTE BEACH HOST-LIKE SUCCESS | le joiner a exécuté le même JumpToSegment(Beach) que le host ; aucun force-field currentSegment ni activation générique du root Beach n'est appliqué."); } else { Log.LogWarning((object)"REMOTE BEACH HOST-LIKE FAILED | la vraie bascule Beach n'a pas été confirmée. Aucun faux succès par simple currentSegment forcé."); } PatchCampfiresForDescent(); ResetExpectedCampfireForCurrentSegmentIfStale($"JOINER HOST-LIKE ENTER {MapHandler.CurrentSegmentNumber}"); yield return (object)new WaitForSeconds(0.2f); Log.LogInfo((object)$"CAMPFIRE MEMORY LOCK | completed={completedCampfirePaths.Count} | aucun passage forcé en Spent"); DisableRisingHazard(); triggeredCampfires.Clear(); descentModeReadyAt = Time.time; isCampfireTransitionRunning = false; transitionBlackout = false; Rigidbody val6 = FindBodyRigidbody("Hip"); Log.LogWarning((object)string.Format("REMOTE BEACH HOST-LIKE END | before={0} | current={1} | success={2} | hip={3} | character={4}", beforeSegment, MapHandler.CurrentSegmentNumber, joinerHostLikeBeachJumpSucceeded, ((Object)(object)val6 != (Object)null) ? ((object)val6.position/*cast due to .constrained prefix*/).ToString() : "null", (Object)(object)Character.localCharacter != (Object)null)); } private IEnumerator ApplyRemoteCalderaTransitionSoftState() { isCampfireTransitionRunning = true; transitionBlackout = true; Segment beforeSegment = MapHandler.CurrentSegmentNumber; Campfire val = FindSourceCampfireForTargetSegment((Segment)3); string text = (((Object)(object)val != (Object)null) ? GetPath(((Component)val).transform) : "null"); if ((Object)(object)val != (Object)null) { completedCampfirePaths.Add(text); } Log.LogWarning((object)$"REMOTE CALDERA SOFT START | before={beforeSegment} | source={text} | aucun GoToSegment local"); yield return (object)new WaitForSeconds(1.15f); bool softPrepared = PrepareJoinerCalderaSoftState("CODE 171"); bool segmentForced = TryForceLocalMapSegment((Segment)3); PatchCampfiresForDescent(); yield return (object)new WaitForSeconds(0.15f); DisableRisingHazard(); float snapshotWaitUntil = Time.time + 5f; int expectedEpoch = Math.Max(1, lastHandledNetworkStartEpoch); while (Time.time < snapshotWaitUntil && lastAppliedKilnSceneStateEpoch < expectedEpoch) { yield return (object)new WaitForSeconds(0.1f); } triggeredCampfires.Clear(); descentModeReadyAt = Time.time; isCampfireTransitionRunning = false; transitionBlackout = false; Rigidbody val2 = FindBodyRigidbody("Hip"); Log.LogWarning((object)string.Format("REMOTE CALDERA SOFT END | before={0} | current={1} | softPrepared={2} | segmentForced={3} | snapshotEpoch={4} | expectedEpoch={5} | hip={6} | character={7}", beforeSegment, MapHandler.CurrentSegmentNumber, softPrepared, segmentForced, lastAppliedKilnSceneStateEpoch, expectedEpoch, ((Object)(object)val2 != (Object)null) ? ((object)val2.position/*cast due to .constrained prefix*/).ToString() : "null", (Object)(object)Character.localCharacter != (Object)null)); } private bool PrepareJoinerCalderaSoftState(string source) { try { Transform val = FindExactTransformByPath("Map/Biome_4/Volcano/Caldera_Segment"); Transform val2 = FindExactTransformByPath("Map/Biome_4/Volcano/Volcano_Segment"); if ((Object)(object)val == (Object)null || (Object)(object)val2 == (Object)null) { Log.LogWarning((object)$"CALDERA SOFT STATE annulé | source={source} | caldera={(Object)(object)val != (Object)null} | volcano={(Object)(object)val2 != (Object)null}"); return false; } bool activeSelf = ((Component)val).gameObject.activeSelf; bool activeSelf2 = ((Component)val2).gameObject.activeSelf; if (!((Component)val).gameObject.activeSelf) { ((Component)val).gameObject.SetActive(true); } if (!((Component)val2).gameObject.activeSelf) { ((Component)val2).gameObject.SetActive(true); } SoftSuppressSegmentHierarchy(val2, out var disabledBehaviours, out var disabledRenderers, out var disabledColliders, out var stoppedParticles); Physics.SyncTransforms(); Log.LogWarning((object)$"CALDERA SOFT STATE READY | source={source} | caldera {activeSelf}->{((Component)val).gameObject.activeSelf} | volcanoRoot {activeSelf2}->{((Component)val2).gameObject.activeSelf} (root conservé) | behavioursOff={disabledBehaviours} | renderersOff={disabledRenderers} | collidersOff={disabledColliders} | particlesStopped={stoppedParticles} | character={(Object)(object)Character.localCharacter != (Object)null}"); return ((Component)val).gameObject.activeInHierarchy && ((Component)val2).gameObject.activeInHierarchy && kilnSoftSuppressionActive; } catch (Exception ex) { Log.LogWarning((object)("PrepareJoinerCalderaSoftState erreur : " + ex.GetType().Name + " - " + ex.Message)); return false; } } private void SoftSuppressSegmentHierarchy(Transform segmentRoot, out int disabledBehaviours, out int disabledRenderers, out int disabledColliders, out int stoppedParticles) { disabledBehaviours = 0; disabledRenderers = 0; disabledColliders = 0; stoppedParticles = 0; Behaviour[] componentsInChildren = ((Component)segmentRoot).GetComponentsInChildren(true); Behaviour[] array = componentsInChildren; foreach (Behaviour val in array) { if (!((Object)(object)val == (Object)null)) { if (!kilnSoftSuppressedBehaviours.ContainsKey(val)) { kilnSoftSuppressedBehaviours[val] = val.enabled; } if (val.enabled) { val.enabled = false; disabledBehaviours++; } } } Renderer[] componentsInChildren2 = ((Component)segmentRoot).GetComponentsInChildren(true); Renderer[] array2 = componentsInChildren2; foreach (Renderer val2 in array2) { if (!((Object)(object)val2 == (Object)null)) { if (!kilnSoftSuppressedRenderers.ContainsKey(val2)) { kilnSoftSuppressedRenderers[val2] = val2.enabled; } if (val2.enabled) { val2.enabled = false; disabledRenderers++; } } } Collider[] componentsInChildren3 = ((Component)segmentRoot).GetComponentsInChildren(true); Collider[] array3 = componentsInChildren3; foreach (Collider val3 in array3) { if (!((Object)(object)val3 == (Object)null)) { if (!kilnSoftSuppressedColliders.ContainsKey(val3)) { kilnSoftSuppressedColliders[val3] = val3.enabled; } if (val3.enabled) { val3.enabled = false; disabledColliders++; } } } ParticleSystem[] componentsInChildren4 = ((Component)segmentRoot).GetComponentsInChildren(true); ParticleSystem[] array4 = componentsInChildren4; foreach (ParticleSystem val4 in array4) { if (!((Object)(object)val4 == (Object)null)) { if (!kilnSoftSuppressedParticles.ContainsKey(val4)) { kilnSoftSuppressedParticles[val4] = val4.isPlaying; } if (val4.isPlaying) { val4.Stop(true, (ParticleSystemStopBehavior)0); stoppedParticles++; } } } kilnSoftSuppressionActive = true; Physics.SyncTransforms(); } private void RestoreJoinerKilnStateForNewRun(string source) { try { int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; KeyValuePair[] array = kilnSoftSuppressedBehaviours.ToArray(); for (int i = 0; i < array.Length; i++) { KeyValuePair keyValuePair = array[i]; Behaviour key = keyValuePair.Key; if (!((Object)(object)key == (Object)null)) { key.enabled = keyValuePair.Value; num++; } } KeyValuePair[] array2 = kilnSoftSuppressedRenderers.ToArray(); for (int j = 0; j < array2.Length; j++) { KeyValuePair keyValuePair2 = array2[j]; Renderer key2 = keyValuePair2.Key; if (!((Object)(object)key2 == (Object)null)) { key2.enabled = keyValuePair2.Value; num2++; } } KeyValuePair[] array3 = kilnSoftSuppressedColliders.ToArray(); for (int k = 0; k < array3.Length; k++) { KeyValuePair keyValuePair3 = array3[k]; Collider key3 = keyValuePair3.Key; if (!((Object)(object)key3 == (Object)null)) { key3.enabled = keyValuePair3.Value; num3++; } } KeyValuePair[] array4 = kilnSoftSuppressedParticles.ToArray(); for (int l = 0; l < array4.Length; l++) { KeyValuePair keyValuePair4 = array4[l]; ParticleSystem key4 = keyValuePair4.Key; if (!((Object)(object)key4 == (Object)null)) { if (keyValuePair4.Value) { key4.Play(true); num4++; } else { key4.Stop(true, (ParticleSystemStopBehavior)0); } } } kilnSoftSuppressedBehaviours.Clear(); kilnSoftSuppressedRenderers.Clear(); kilnSoftSuppressedColliders.Clear(); kilnSoftSuppressedParticles.Clear(); kilnSoftSuppressionActive = false; Transform val = FindExactTransformByPath("Map/Biome_4/Volcano/Caldera_Segment"); Transform val2 = FindExactTransformByPath("Map/Biome_4/Volcano/Volcano_Segment"); if ((Object)(object)val != (Object)null) { ((Component)val).gameObject.SetActive(false); } if ((Object)(object)val2 != (Object)null) { ((Component)val2).gameObject.SetActive(true); } Physics.SyncTransforms(); Log.LogInfo((object)$"KILN SOFT RESTORE | source={source} | behaviours={num} | renderers={num2} | colliders={num3} | particlesRestarted={num4} | calderaOff={(Object)(object)val != (Object)null && !((Component)val).gameObject.activeSelf} | volcanoOn={(Object)(object)val2 != (Object)null && ((Component)val2).gameObject.activeSelf}"); } catch (Exception ex) { Log.LogWarning((object)("RestoreJoinerKilnStateForNewRun erreur : " + ex.GetType().Name + " - " + ex.Message)); } } private IEnumerator StabilizeLocalBodyAfterAlpineTransition(Segment beforeSegment, Segment targetSegment, Vector3 hipBefore, bool hadHipBefore, string source) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if ((int)beforeSegment != 3 || (int)targetSegment != 2) { yield break; } if (!hadHipBefore || (Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)$"CAMPFIRE TRANSITION STABILIZE SKIP | source={source} | before={beforeSegment} | target={targetSegment} | hadHipBefore={hadHipBefore} | character={(Object)(object)Character.localCharacter != (Object)null}"); yield break; } yield return (object)new WaitForSeconds(0.1f); for (int attempt = 1; attempt <= 2; attempt++) { Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; if (currentSegmentNumber != targetSegment) { Log.LogWarning((object)$"CAMPFIRE TRANSITION STABILIZE SKIP | source={source} | tentative={attempt}/2 | current={currentSegmentNumber} | target={targetSegment}"); break; } Rigidbody val = FindBodyRigidbody("Hip"); if ((Object)(object)val == (Object)null || (Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)$"CAMPFIRE TRANSITION STABILIZE SKIP | source={source} | tentative={attempt}/2 | hip={(Object)(object)val != (Object)null} | character={(Object)(object)Character.localCharacter != (Object)null}"); break; } Vector3 position = val.position; float num = Vector3.Distance(hipBefore, position); Log.LogWarning((object)$"CAMPFIRE TRANSITION BODY DRIFT | source={source} | tentative={attempt}/2 | before={beforeSegment} | target={targetSegment} | beforeHip={hipBefore} | afterHip={position} | moved={num:0.00} | seuil={1.25f:0.00}"); if (num > 1.25f) { bool restored = MoveLocalCharacterBodyNetworkAligned(hipBefore, $"CAMPFIRE TRANSITION STABILIZE {beforeSegment} -> {targetSegment} {source} TRY {attempt}"); Physics.SyncTransforms(); yield return (object)new WaitForSeconds(0.05f); Rigidbody val2 = FindBodyRigidbody("Hip"); string text = (((Object)(object)val2 != (Object)null) ? ((object)val2.position/*cast due to .constrained prefix*/).ToString() : "null"); float num2 = (((Object)(object)val2 != (Object)null) ? Vector3.Distance(val2.position, hipBefore) : (-1f)); Log.LogWarning((object)$"CAMPFIRE TRANSITION STABILIZED | source={source} | tentative={attempt}/2 | restored={restored} | finalHip={text} | erreur={num2:0.00}"); } if (attempt < 2) { yield return (object)new WaitForSeconds(0.35f); } } } private IEnumerator ApplyRemoteSegmentTransitionWithLocalGoTo(Segment targetSegment) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) isCampfireTransitionRunning = true; Segment beforeSegment = MapHandler.CurrentSegmentNumber; Campfire val = FindSourceCampfireForTargetSegment(targetSegment); string text = (((Object)(object)val != (Object)null) ? GetPath(((Component)val).transform) : "null"); if ((Object)(object)val != (Object)null) { completedCampfirePaths.Add(text); } Log.LogWarning((object)$"REMOTE SEGMENT LOCAL-GOTO START | before={beforeSegment} | target={targetSegment} | source={text}"); bool hideTransition = (int)targetSegment == 3; if (hideTransition) { transitionBlackout = true; yield return (object)new WaitForSeconds(0.15f); } Rigidbody hipBeforeRb = FindBodyRigidbody("Hip"); Vector3 hipBefore = (((Object)(object)hipBeforeRb != (Object)null) ? hipBeforeRb.position : Vector3.zero); bool flag = TryGoToSegmentInstanceLocal(targetSegment); Log.LogInfo((object)$"REMOTE LOCAL GOTO INVOKED | target={targetSegment} | invoked={flag}"); yield return (object)new WaitForSeconds(1.25f); Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; bool flag2 = EnsureExactLocalSegmentContentActive(targetSegment, activateIfInactive: false); Log.LogInfo((object)$"REMOTE LOCAL GOTO RESULT | before={beforeSegment} | after={currentSegmentNumber} | target={targetSegment} | exactContentActive={flag2}"); if (!(currentSegmentNumber == targetSegment && flag2) || !((Object)(object)Character.localCharacter != (Object)null)) { Log.LogWarning((object)$"REMOTE LOCAL GOTO incomplet | target={targetSegment} | after={currentSegmentNumber} | content={flag2} | character={(Object)(object)Character.localCharacter != (Object)null} | fallback local ciblé"); bool segmentForced = TryForceLocalMapSegment(targetSegment); bool exactContentForced = EnsureExactLocalSegmentContentActive(targetSegment, activateIfInactive: true); Physics.SyncTransforms(); yield return (object)new WaitForSeconds(0.5f); Log.LogWarning((object)$"REMOTE EXACT FALLBACK RESULT | target={targetSegment} | forced={segmentForced} | exactContentForced={exactContentForced} | current={MapHandler.CurrentSegmentNumber}"); if ((int)targetSegment == 3 && !exactContentForced) { yield return ((MonoBehaviour)this).StartCoroutine(BypassKilnFogWallForJoinerIfNeeded(targetSegment, "REMOTE EXACT FALLBACK")); } } else { Log.LogInfo((object)$"REMOTE LOCAL GOTO OK | target={targetSegment} | aucun TP de bypass : le joueur reste près du feu."); } yield return ((MonoBehaviour)this).StartCoroutine(StabilizeLocalBodyAfterAlpineTransition(beforeSegment, targetSegment, hipBefore, (Object)(object)hipBeforeRb != (Object)null, "JOINER LOCAL GOTO")); PatchCampfiresForDescent(); ResetExpectedCampfireForCurrentSegmentIfStale($"JOINER ENTER {MapHandler.CurrentSegmentNumber}"); yield return (object)new WaitForSeconds(0.2f); DisableRisingHazard(); triggeredCampfires.Clear(); descentModeReadyAt = Time.time; isCampfireTransitionRunning = false; if (hideTransition) { transitionBlackout = false; } Rigidbody val2 = FindBodyRigidbody("Hip"); string text2 = (((Object)(object)val2 != (Object)null) ? ((object)val2.position/*cast due to .constrained prefix*/).ToString() : "null"); float num = (((Object)(object)val2 != (Object)null && (Object)(object)hipBeforeRb != (Object)null) ? Vector3.Distance(hipBefore, val2.position) : (-1f)); Log.LogWarning((object)$"REMOTE SEGMENT LOCAL-GOTO END | before={beforeSegment} | current={MapHandler.CurrentSegmentNumber} | target={targetSegment} | hip={text2} | moved={num:0.00} | completed={completedCampfirePaths.Count}"); } private bool TryGoToSegmentInstanceLocal(Segment targetSegment) { //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) try { MapHandler[] array = Resources.FindObjectsOfTypeAll(); MethodInfo method = typeof(MapHandler).GetMethod("GoToSegment", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { Log.LogWarning((object)"REMOTE LOCAL GOTO : MapHandler.GoToSegment introuvable."); return false; } Log.LogInfo((object)string.Format("REMOTE LOCAL GOTO METHOD | {0} {1}({2}) | handlers={3}", method.ReturnType.Name, method.Name, string.Join(", ", from p in method.GetParameters() select p.ParameterType.Name + " " + p.Name), array.Length)); MapHandler[] array2 = array; foreach (MapHandler val in array2) { if (!((Object)(object)val == (Object)null)) { try { method.Invoke(val, new object[1] { targetSegment }); Log.LogInfo((object)$"REMOTE LOCAL GOTO CALL OK | target={targetSegment} | handler='{((Object)val).name}'"); return true; } catch (TargetInvocationException ex) { Exception ex2 = ex.InnerException ?? ex; Log.LogWarning((object)$"REMOTE LOCAL GOTO CALL a levé {ex2.GetType().Name} - {ex2.Message} | target={targetSegment}"); return true; } } } Log.LogWarning((object)"REMOTE LOCAL GOTO : aucune instance MapHandler utilisable."); return false; } catch (Exception ex3) { Log.LogWarning((object)$"TryGoToSegmentInstanceLocal({targetSegment}) erreur : {ex3.GetType().Name} - {ex3.Message}"); return false; } } private bool EnsureExactLocalSegmentContentActive(Segment targetSegment, bool activateIfInactive) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected I4, but got Unknown //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) try { string[] array = (int)targetSegment switch { 3 => new string[1] { "Map/Biome_4/Volcano/Volcano_Segment" }, 2 => new string[1] { "Map/Biome_3/Alpine" }, 1 => new string[2] { "Map/Biome_2/Tropics", "Map/Biome_2/Roots" }, 0 => new string[1] { "Map/Biome_1/Beach" }, _ => Array.Empty(), }; Transform[] source = Resources.FindObjectsOfTypeAll(); Transform val = null; string text = "null"; string[] array2 = array; foreach (string candidatePath in array2) { val = ((IEnumerable)source).FirstOrDefault((Func)((Transform transform) => (Object)(object)transform != (Object)null && GetPath(transform).Equals(candidatePath, StringComparison.Ordinal))); if ((Object)(object)val != (Object)null) { text = candidatePath; break; } } if ((Object)(object)val == (Object)null) { string arg = string.Join(" | ", (from transform in source where (Object)(object)transform != (Object)null select GetPath(transform) into path where path.StartsWith("Map/Biome_4/Volcano", StringComparison.Ordinal) && (path.IndexOf("Segment", StringComparison.OrdinalIgnoreCase) >= 0 || path.IndexOf("Lava", StringComparison.OrdinalIgnoreCase) >= 0 || path.IndexOf("Caldera", StringComparison.OrdinalIgnoreCase) >= 0) select path).Distinct().Take(20)); Log.LogWarning((object)$"EXACT SEGMENT CONTENT introuvable | target={targetSegment} | candidatsVolcano=[{arg}]"); return false; } bool activeSelf = ((Component)val).gameObject.activeSelf; bool activeInHierarchy = ((Component)val).gameObject.activeInHierarchy; if (activateIfInactive && !((Component)val).gameObject.activeSelf) { ((Component)val).gameObject.SetActive(true); Physics.SyncTransforms(); } Renderer[] componentsInChildren = ((Component)val).GetComponentsInChildren(true); Collider[] componentsInChildren2 = ((Component)val).GetComponentsInChildren(true); int num = componentsInChildren.Count((Renderer renderer) => (Object)(object)renderer != (Object)null && ((Component)renderer).gameObject.activeInHierarchy && renderer.enabled); int num2 = componentsInChildren2.Count((Collider collider) => (Object)(object)collider != (Object)null && ((Component)collider).gameObject.activeInHierarchy && collider.enabled); bool activeInHierarchy2 = ((Component)val).gameObject.activeInHierarchy; Log.LogInfo((object)$"EXACT SEGMENT CONTENT | target={targetSegment} | path={text} | beforeSelf={activeSelf} | beforeHierarchy={activeInHierarchy} | afterSelf={((Component)val).gameObject.activeSelf} | afterHierarchy={activeInHierarchy2} | renderers={num}/{componentsInChildren.Length} | colliders={num2}/{componentsInChildren2.Length} | activateIfInactive={activateIfInactive}"); return activeInHierarchy2; } catch (Exception ex) { Log.LogWarning((object)$"EnsureExactLocalSegmentContentActive({targetSegment}) erreur : {ex.GetType().Name} - {ex.Message}"); return false; } } private bool TryForceLocalMapSegment(Segment targetSegment) { //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) try { Type typeFromHandle = typeof(MapHandler); BindingFlags bindingFlags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; BindingFlags bindingFlags2 = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; PropertyInfo property = typeFromHandle.GetProperty("CurrentSegmentNumber", bindingFlags | bindingFlags2); if (property != null && property.CanWrite) { object obj = null; if (property.SetMethod != null && !property.SetMethod.IsStatic) { obj = Resources.FindObjectsOfTypeAll().FirstOrDefault(); } if (property.SetMethod == null || property.SetMethod.IsStatic || obj != null) { property.SetValue(obj, targetSegment); Log.LogInfo((object)$"MAP SEGMENT FORCE PROPERTY | CurrentSegmentNumber={targetSegment}"); } } string[] array = new string[5] { "currentSegment", "currentSegmentNumber", "_currentSegment", "_currentSegmentNumber", "k__BackingField" }; FieldInfo fieldInfo = null; string[] array2 = array; foreach (string name in array2) { fieldInfo = typeFromHandle.GetField(name, bindingFlags | bindingFlags2); if (fieldInfo != null) { break; } } if (fieldInfo != null) { object value = ((fieldInfo.FieldType == typeof(int)) ? ((object)Convert.ToInt32(targetSegment)) : ((object)targetSegment)); if (fieldInfo.IsStatic) { fieldInfo.SetValue(null, value); Log.LogInfo((object)$"MAP SEGMENT FORCE FIELD | static {fieldInfo.Name}={targetSegment}"); } else { MapHandler[] array3 = Resources.FindObjectsOfTypeAll(); int num = 0; MapHandler[] array4 = array3; foreach (MapHandler val in array4) { if (!((Object)(object)val == (Object)null)) { fieldInfo.SetValue(val, value); num++; } } Log.LogInfo((object)$"MAP SEGMENT FORCE FIELD | instance {fieldInfo.Name}={targetSegment} | handlers={num}"); } } else { string text = string.Join(", ", from field in typeFromHandle.GetFields(bindingFlags | bindingFlags2) where field.Name.IndexOf("segment", StringComparison.OrdinalIgnoreCase) >= 0 select field.FieldType.Name + ":" + field.Name); Log.LogWarning((object)("MAP SEGMENT FORCE : aucun champ candidat exact | fields=[" + text + "]")); } Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; bool flag = currentSegmentNumber == targetSegment; Log.LogInfo((object)$"MAP SEGMENT FORCE RESULT | target={targetSegment} | after={currentSegmentNumber} | ok={flag}"); return flag; } catch (Exception ex) { Log.LogWarning((object)$"TryForceLocalMapSegment({targetSegment}) erreur : {ex.GetType().Name} - {ex.Message}"); return false; } } private bool ActivateLocalDestinationBranchForSegment(Segment targetSegment) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_00ae: Unknown result type (might be due to invalid IL or missing references) try { Campfire val = FindDebugDescentCampfireForCurrentSegment(targetSegment); if ((Object)(object)val == (Object)null) { Log.LogWarning((object)$"REMOTE BRANCH ACTIVATE : aucun campfire destination pour {targetSegment}"); return false; } Transform val2 = ((Component)val).transform; int num = 0; string path = GetPath(((Component)val).transform); while ((Object)(object)val2 != (Object)null) { if (!((Component)val2).gameObject.activeSelf) { ((Component)val2).gameObject.SetActive(true); num++; } if (((Object)val2).name.StartsWith("Biome_", StringComparison.OrdinalIgnoreCase)) { break; } val2 = val2.parent; } ((Component)val).gameObject.SetActive(true); Physics.SyncTransforms(); Log.LogInfo((object)$"REMOTE BRANCH ACTIVATE | target={targetSegment} | path={path} | activeHierarchy={((Component)val).gameObject.activeInHierarchy} | activated={num}"); return ((Component)val).gameObject.activeInHierarchy; } catch (Exception ex) { Log.LogWarning((object)$"ActivateLocalDestinationBranchForSegment({targetSegment}) erreur : {ex.GetType().Name} - {ex.Message}"); return false; } } private Campfire? FindSourceCampfireForTargetSegment(Segment targetSegment) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) try { Campfire[] source = Resources.FindObjectsOfTypeAll(); Campfire val = (from campfire in source where (Object)(object)campfire != (Object)null where ((Component)campfire).gameObject.activeInHierarchy select campfire).FirstOrDefault((Func)((Campfire campfire) => GetForcedDescentTargetForCampfire(campfire) == (Segment?)targetSegment)); if ((Object)(object)val != (Object)null) { return val; } return (from campfire in source where (Object)(object)campfire != (Object)null where GetPath(((Component)campfire).transform).StartsWith("Map/") select campfire).FirstOrDefault((Func)((Campfire campfire) => GetForcedDescentTargetForCampfire(campfire) == (Segment?)targetSegment)); } catch (Exception ex) { Log.LogWarning((object)$"FindSourceCampfireForTargetSegment erreur | target={targetSegment} | {ex.Message}"); return null; } } private void MarkCurrentSegmentCampfireCompletedForTransition() { //IL_000e: 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_00b6: Unknown result type (might be due to invalid IL or missing references) try { Segment current = MapHandler.CurrentSegmentNumber; Campfire val = (from c in Resources.FindObjectsOfTypeAll() where (Object)(object)c != (Object)null where ((Component)c).gameObject.activeInHierarchy select c).FirstOrDefault((Func)((Campfire c) => CampfireMatchesCurrentSegmentForDebug(c, current))); if (!((Object)(object)val == (Object)null)) { string path = GetPath(((Component)val).transform); completedCampfirePaths.Add(path); ((MonoBehaviour)this).StartCoroutine(DumpCampfirePostLightState(val, path)); Log.LogInfo((object)$"CAMPFIRE COMPLETED FROM SEGMENT_CHANGE | current={current} | path={path} | completed={completedCampfirePaths.Count}"); } } catch (Exception ex) { Log.LogWarning((object)("MarkCurrentSegmentCampfireCompletedForTransition erreur : " + ex.Message)); } } private IEnumerator DoCampfireDescentTransition(Segment targetSegment) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) isCampfireTransitionRunning = true; Log.LogInfo((object)$"Transition descente programmée vers {targetSegment} dans 1 seconde..."); yield return (object)new WaitForSeconds(1f); bool jumpThrew = false; Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Rigidbody val = FindBodyRigidbody("Hip"); Vector3 hipBefore = (((Object)(object)val != (Object)null) ? val.position : Vector3.zero); try { Segment currentSegmentNumber2 = MapHandler.CurrentSegmentNumber; if (currentSegmentNumber2 == targetSegment) { Log.LogInfo((object)$"Transition descente : segment déjà répliqué sur {targetSegment}, JumpToSegment local ignoré."); } else { Log.LogInfo((object)$"Transition descente : JumpToSegment({targetSegment}) | currentAvant={currentSegmentNumber2}"); MapHandler.JumpToSegment(targetSegment); Log.LogInfo((object)$"JumpToSegment({targetSegment}) terminé sans exception."); } } catch (Exception ex) { jumpThrew = true; Log.LogWarning((object)$"JumpToSegment({targetSegment}) a levé une exception, mais on continue le nettoyage post-transition : {ex.GetType().Name} - {ex.Message}"); } yield return ((MonoBehaviour)this).StartCoroutine(StabilizeLocalBodyAfterAlpineTransition(currentSegmentNumber, targetSegment, hipBefore, (Object)(object)val != (Object)null, "HOST SOLO JUMP")); yield return (object)new WaitForSeconds(1.5f); PatchCampfiresForDescent(); ResetExpectedCampfireForCurrentSegmentIfStale($"HOST SOLO ENTER {MapHandler.CurrentSegmentNumber}"); yield return (object)new WaitForSeconds(0.2f); Log.LogInfo((object)$"CAMPFIRE MEMORY LOCK | completed={completedCampfirePaths.Count} | aucun passage forcé en Spent"); yield return (object)new WaitForSeconds(0.2f); DisableRisingHazard(); if ((int)targetSegment == 3 && IsPhotonInRoom() && IsPhotonMasterClient() && photonEventBridgeInstalled) { yield return (object)new WaitForSeconds(0.25f); SendKilnSceneStateSnapshotToOthers(); } yield return ((MonoBehaviour)this).StartCoroutine(BypassKilnFogWallForJoinerIfNeeded(targetSegment, "JUMP FALLBACK")); triggeredCampfires.Clear(); descentModeReadyAt = Time.time; isCampfireTransitionRunning = false; Log.LogInfo((object)$"Transition descente terminée. Segment actuel = {MapHandler.CurrentSegmentNumber} | jumpException={jumpThrew}"); } private void SendKilnSceneStateSnapshotToOthers() { //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_00af: Unknown result type (might be due to invalid IL or missing references) try { Transform volcanoRoot = FindExactTransformByPath("Map/Biome_4/Volcano"); Campfire val = FindSourceCampfireForTargetSegment((Segment)3); if ((Object)(object)volcanoRoot == (Object)null || (Object)(object)val == (Object)null) { Log.LogWarning((object)$"KILN HOST STATE SYNC annulé | volcanoRoot={(Object)(object)volcanoRoot != (Object)null} | kilnCampfire={(Object)(object)val != (Object)null}"); return; } Vector3 position = ((Component)val).transform.position; Transform[] componentsInChildren = ((Component)volcanoRoot).GetComponentsInChildren(true); HashSet hashSet = new HashSet(); Transform[] array = componentsInChildren; foreach (Transform val2 in array) { if (!((Object)(object)val2 == (Object)null) && IsTransformRelevantToKilnStateSync(val2, position)) { Transform val3 = val2; while ((Object)(object)val3 != (Object)null && (Object)(object)val3 != (Object)(object)volcanoRoot) { hashSet.Add(val3); val3 = val3.parent; } hashSet.Add(volcanoRoot); } } List list = (from transform in hashSet where (Object)(object)transform != (Object)null orderby GetTransformDepthFromRoot(volcanoRoot, transform), GetSiblingIndexPath(volcanoRoot, transform) select transform).ToList(); StringBuilder stringBuilder = new StringBuilder(); int num = 0; foreach (Transform item in list) { string siblingIndexPath = GetSiblingIndexPath(volcanoRoot, item); Renderer[] components = ((Component)item).GetComponents(); Collider[] components2 = ((Component)item).GetComponents(); ParticleSystem[] components3 = ((Component)item).GetComponents(); Behaviour[] components4 = (from behaviour in ((Component)item).GetComponents() where (Object)(object)behaviour != (Object)null && IsVisualEffectBehaviour(behaviour) select behaviour).ToArray(); string value = BuildEnabledBits(components); string value2 = BuildEnabledBits(components2); string value3 = ((components3.Length == 0) ? "-" : new string(components3.Select((ParticleSystem particle) => (!((Object)(object)particle != (Object)null) || !particle.isPlaying) ? '0' : '1').ToArray())); string value4 = BuildEnabledBits(components4); stringBuilder.Append(siblingIndexPath).Append('\t').Append(((Component)item).gameObject.activeSelf ? '1' : '0') .Append('\t') .Append(value) .Append('\t') .Append(value2) .Append('\t') .Append(value3) .Append('\t') .Append(value4) .Append('\n'); num++; } byte[] bytes = Encoding.UTF8.GetBytes(stringBuilder.ToString()); string text = Convert.ToBase64String(bytes); int num2 = Math.Max(1, (text.Length + 10000 - 1) / 10000); int num3 = Math.Max(1, networkRunEpoch); Log.LogWarning((object)$"KILN HOST STATE SNAPSHOT | records={num} | rawBytes={bytes.Length} | base64Chars={text.Length} | chunks={num2} | epoch={num3}"); for (int num4 = 0; num4 < num2; num4++) { int num5 = num4 * 10000; int length = Math.Min(10000, text.Length - num5); string text2 = text.Substring(num5, length); string content = $"{num3}|{num4}|{num2}|{text2}"; SendPhotonModEvent(176, content, "Others"); } Log.LogWarning((object)$"KILN HOST STATE SNAPSHOT SENT | chunks={num2} | epoch={num3}"); } catch (Exception ex) { Log.LogWarning((object)("SendKilnSceneStateSnapshotToOthers erreur : " + ex.GetType().Name + " - " + ex.Message)); } } private void HandleKilnSceneStateChunk(object? customData) { try { if (joinerHostLikeCalderaJumpSucceeded) { Log.LogInfo((object)"KILN STATE CHUNK 176 ignoré : le JumpToSegment Caldera local V2.11 a déjà reproduit l'état du host."); return; } string text = customData as string; if (string.IsNullOrEmpty(text)) { Log.LogWarning((object)"KILN STATE CHUNK ignoré : payload non-string ou vide."); return; } string[] array = text.Split(new char[1] { '|' }, 4); if (array.Length != 4) { Log.LogWarning((object)$"KILN STATE CHUNK format invalide | parts={array.Length}"); return; } int num = Convert.ToInt32(array[0]); int num2 = Convert.ToInt32(array[1]); int num3 = Convert.ToInt32(array[2]); string value = array[3]; if (kilnSceneStateChunkEpoch != num || kilnSceneStateExpectedChunks != num3) { kilnSceneStateChunks.Clear(); kilnSceneStateChunkEpoch = num; kilnSceneStateExpectedChunks = num3; } kilnSceneStateChunks[num2] = value; Log.LogInfo((object)$"KILN STATE CHUNK RECEIVE | epoch={num} | chunk={num2 + 1}/{num3} | received={kilnSceneStateChunks.Count}"); if (kilnSceneStateChunks.Count < kilnSceneStateExpectedChunks) { return; } StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < kilnSceneStateExpectedChunks; i++) { if (!kilnSceneStateChunks.TryGetValue(i, out string value2)) { Log.LogWarning((object)$"KILN STATE SNAPSHOT incomplet malgré count | chunk manquant={i}"); return; } stringBuilder.Append(value2); } string @base = stringBuilder.ToString(); kilnSceneStateChunks.Clear(); kilnSceneStateExpectedChunks = 0; ((MonoBehaviour)this).StartCoroutine(ApplyKilnHostSceneStateSnapshot(num, @base)); } catch (Exception ex) { Log.LogWarning((object)("HandleKilnSceneStateChunk erreur : " + ex.GetType().Name + " - " + ex.Message)); } } private IEnumerator ApplyKilnHostSceneStateSnapshot(int epoch, string base64) { float waitUntil = Time.time + 4f; while (Time.time < waitUntil && (Object)(object)Character.localCharacter == (Object)null) { yield return (object)new WaitForSeconds(0.1f); } transitionBlackout = true; yield return (object)new WaitForSeconds(0.1f); Transform volcanoRoot = FindExactTransformByPath("Map/Biome_4/Volcano"); Transform val = FindExactTransformByPath("Map/Biome_4/Volcano/Volcano_Segment"); Transform val2 = FindExactTransformByPath("Map/Biome_4/Volcano/Caldera_Segment"); if ((Object)(object)volcanoRoot == (Object)null || (Object)(object)val == (Object)null || (Object)(object)val2 == (Object)null) { Log.LogWarning((object)$"KILN HOST STATE APPLY annulé | volcanoRoot={(Object)(object)volcanoRoot != (Object)null} | volcanoSegment={(Object)(object)val != (Object)null} | calderaSegment={(Object)(object)val2 != (Object)null}"); transitionBlackout = false; yield break; } try { byte[] bytes = Convert.FromBase64String(base64); string text = Encoding.UTF8.GetString(bytes); string[] array = text.Split(new char[1] { '\n' }, StringSplitOptions.RemoveEmptyEntries); List> list = new List>(); int num = 0; string[] array2 = array; foreach (string text2 in array2) { string[] array3 = text2.Split('\t'); if (array3.Length == 6) { Transform val3 = ResolveSiblingIndexPath(volcanoRoot, array3[0]); if ((Object)(object)val3 == (Object)null) { num++; } else { list.Add(new KeyValuePair(val3, array3)); } } } bool? flag = null; bool? flag2 = null; foreach (KeyValuePair item in list) { if ((Object)(object)item.Key == (Object)(object)val) { flag = item.Value[1] == "1"; } else if ((Object)(object)item.Key == (Object)(object)val2) { flag2 = item.Value[1] == "1"; } } Log.LogWarning((object)string.Format("KILN HOST ROOT STATE | epoch={0} | hostCaldera={1} | hostVolcano={2} | localCaldera={3} | localVolcano={4} | character={5}", epoch, flag2?.ToString() ?? "missing", flag?.ToString() ?? "missing", ((Component)val2).gameObject.activeSelf, ((Component)val).gameObject.activeSelf, (Object)(object)Character.localCharacter != (Object)null)); if (flag2 == true && !((Component)val2).gameObject.activeSelf) { ((Component)val2).gameObject.SetActive(true); } int disabledBehaviours = 0; int disabledRenderers = 0; int disabledColliders = 0; int stoppedParticles = 0; if (flag == false) { if (!((Component)val).gameObject.activeSelf) { ((Component)val).gameObject.SetActive(true); } SoftSuppressSegmentHierarchy(val, out disabledBehaviours, out disabledRenderers, out disabledColliders, out stoppedParticles); } int num2 = 0; int num3 = 0; int num4 = 0; int num5 = 0; int num6 = 0; int loggedDiffs = 0; foreach (KeyValuePair item2 in list.OrderBy((KeyValuePair pair) => GetTransformDepthFromRoot(volcanoRoot, pair.Key))) { Transform key = item2.Key; if (IsSameOrChildOf(key, val)) { continue; } string[] value = item2.Value; bool flag3 = value[1] == "1"; if (((Component)key).gameObject.activeSelf != flag3) { if (loggedDiffs < 30) { Log.LogWarning((object)$"KILN HOST STATE DIFF ACTIVE | local={((Component)key).gameObject.activeSelf} | host={flag3} | path={GetPath(key)}"); loggedDiffs++; } ((Component)key).gameObject.SetActive(flag3); num2++; } } foreach (KeyValuePair item3 in list) { Transform key2 = item3.Key; if (IsSameOrChildOf(key2, val)) { continue; } string[] value2 = item3.Value; Renderer[] components = ((Component)key2).GetComponents(); Collider[] components2 = ((Component)key2).GetComponents(); ParticleSystem[] components3 = ((Component)key2).GetComponents(); Behaviour[] components4 = (from behaviour in ((Component)key2).GetComponents() where (Object)(object)behaviour != (Object)null && IsVisualEffectBehaviour(behaviour) select behaviour).ToArray(); num3 += ApplyEnabledBits(components, value2[2], "Renderer", key2, ref loggedDiffs); num4 += ApplyEnabledBits(components2, value2[3], "Collider", key2, ref loggedDiffs); if (value2[4] != "-") { int num7 = Math.Min(components3.Length, value2[4].Length); for (int num8 = 0; num8 < num7; num8++) { ParticleSystem val4 = components3[num8]; if ((Object)(object)val4 == (Object)null) { continue; } bool flag4 = value2[4][num8] == '1'; bool isPlaying = val4.isPlaying; if (isPlaying != flag4) { if (loggedDiffs < 30) { Log.LogWarning((object)$"KILN HOST STATE DIFF PARTICLE | index={num8} | local={isPlaying} | host={flag4} | path={GetPath(key2)}"); loggedDiffs++; } if (flag4) { val4.Play(true); } else { val4.Stop(true, (ParticleSystemStopBehavior)0); } num5++; } } } num6 += ApplyEnabledBits(components4, value2[5], "VisualEffect", key2, ref loggedDiffs); } bool flag5 = TryForceLocalMapSegment((Segment)3); Physics.SyncTransforms(); lastAppliedKilnSceneStateEpoch = Math.Max(lastAppliedKilnSceneStateEpoch, epoch); Log.LogWarning((object)string.Format("KILN HOST STATE APPLIED SAFE | epoch={0} | records={1} | resolved={2} | missing={3} | hostCaldera={4} | hostVolcano={5} | softBehaviours={6} | softRenderers={7} | softColliders={8} | softParticles={9} | activeDiff={10} | rendererDiff={11} | colliderDiff={12} | particleDiff={13} | visualEffectDiff={14} | segmentForced={15} | current={16} | character={17}", epoch, array.Length, list.Count, num, flag2?.ToString() ?? "missing", flag?.ToString() ?? "missing", disabledBehaviours, disabledRenderers, disabledColliders, stoppedParticles, num2, num3, num4, num5, num6, flag5, MapHandler.CurrentSegmentNumber, (Object)(object)Character.localCharacter != (Object)null)); } catch (Exception ex) { Log.LogWarning((object)("ApplyKilnHostSceneStateSnapshot erreur : " + ex.GetType().Name + " - " + ex.Message)); } yield return (object)new WaitForSeconds(0.15f); transitionBlackout = false; } private bool IsSameOrChildOf(Transform transform, Transform potentialParent) { Transform val = transform; while ((Object)(object)val != (Object)null) { if ((Object)(object)val == (Object)(object)potentialParent) { return true; } val = val.parent; } return false; } private int ApplyEnabledBits(T[] components, string bits, string componentLabel, Transform transform, ref int loggedDiffs) where T : Behaviour { if (bits == "-") { return 0; } int num = 0; int num2 = Math.Min(components.Length, bits.Length); for (int i = 0; i < num2; i++) { T val = components[i]; if ((Object)(object)val == (Object)null) { continue; } bool flag = bits[i] == '1'; bool enabled = ((Behaviour)val).enabled; if (enabled != flag) { if (loggedDiffs < 30) { Log.LogWarning((object)$"KILN HOST STATE DIFF {componentLabel.ToUpperInvariant()} | index={i} | local={enabled} | host={flag} | path={GetPath(transform)}"); loggedDiffs++; } ((Behaviour)val).enabled = flag; num++; } } return num; } private int ApplyEnabledBits(Renderer[] components, string bits, string componentLabel, Transform transform, ref int loggedDiffs) { if (bits == "-") { return 0; } int num = 0; int num2 = Math.Min(components.Length, bits.Length); for (int i = 0; i < num2; i++) { Renderer val = components[i]; if ((Object)(object)val == (Object)null) { continue; } bool flag = bits[i] == '1'; bool enabled = val.enabled; if (enabled != flag) { if (loggedDiffs < 30) { Log.LogWarning((object)$"KILN HOST STATE DIFF {componentLabel.ToUpperInvariant()} | index={i} | local={enabled} | host={flag} | path={GetPath(transform)}"); loggedDiffs++; } val.enabled = flag; num++; } } return num; } private int ApplyEnabledBits(Collider[] components, string bits, string componentLabel, Transform transform, ref int loggedDiffs) { if (bits == "-") { return 0; } int num = 0; int num2 = Math.Min(components.Length, bits.Length); for (int i = 0; i < num2; i++) { Collider val = components[i]; if ((Object)(object)val == (Object)null) { continue; } bool flag = bits[i] == '1'; bool enabled = val.enabled; if (enabled != flag) { if (loggedDiffs < 30) { Log.LogWarning((object)$"KILN HOST STATE DIFF {componentLabel.ToUpperInvariant()} | index={i} | local={enabled} | host={flag} | path={GetPath(transform)}"); loggedDiffs++; } val.enabled = flag; num++; } } return num; } private string BuildEnabledBits(T[] components) where T : Behaviour { if (components.Length == 0) { return "-"; } return new string(components.Select((T component) => (!((Object)(object)component != (Object)null) || !((Behaviour)component).enabled) ? '0' : '1').ToArray()); } private string BuildEnabledBits(Renderer[] components) { if (components.Length == 0) { return "-"; } return new string(components.Select((Renderer component) => (!((Object)(object)component != (Object)null) || !component.enabled) ? '0' : '1').ToArray()); } private string BuildEnabledBits(Collider[] components) { if (components.Length == 0) { return "-"; } return new string(components.Select((Collider component) => (!((Object)(object)component != (Object)null) || !component.enabled) ? '0' : '1').ToArray()); } private bool IsVisualEffectBehaviour(Behaviour behaviour) { string text = ((object)behaviour).GetType().FullName ?? ((object)behaviour).GetType().Name; if (text.IndexOf("VisualEffect", StringComparison.OrdinalIgnoreCase) < 0) { return text.IndexOf(".VFX.", StringComparison.OrdinalIgnoreCase) >= 0; } return true; } private bool IsTransformRelevantToKilnStateSync(Transform transform, Vector3 anchor) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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) //IL_007c: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(transform.position, anchor) <= 240f) { return true; } Renderer[] components = ((Component)transform).GetComponents(); Renderer[] array = components; Bounds bounds; foreach (Renderer val in array) { if ((Object)(object)val != (Object)null) { bounds = val.bounds; if (Vector3.Distance(((Bounds)(ref bounds)).center, anchor) <= 240f) { return true; } } } Collider[] components2 = ((Component)transform).GetComponents(); Collider[] array2 = components2; foreach (Collider val2 in array2) { if ((Object)(object)val2 != (Object)null) { bounds = val2.bounds; if (Vector3.Distance(((Bounds)(ref bounds)).center, anchor) <= 240f) { return true; } } } return false; } private int GetTransformDepthFromRoot(Transform root, Transform transform) { int num = 0; Transform val = transform; while ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)root) { num++; val = val.parent; } return num; } private string GetSiblingIndexPath(Transform root, Transform transform) { if ((Object)(object)transform == (Object)(object)root) { return ""; } List list = new List(); Transform val = transform; while ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)root) { list.Add(val.GetSiblingIndex()); val = val.parent; } list.Reverse(); return string.Join(".", list); } private Transform? ResolveSiblingIndexPath(Transform root, string indexPath) { if (string.IsNullOrEmpty(indexPath)) { return root; } Transform val = root; string[] array = indexPath.Split('.'); string[] array2 = array; foreach (string s in array2) { if (!int.TryParse(s, out var result)) { return null; } if (result < 0 || result >= val.childCount) { return null; } val = val.GetChild(result); } return val; } private Transform? FindExactTransformByPath(string exactPath) { return ((IEnumerable)Resources.FindObjectsOfTypeAll()).FirstOrDefault((Func)((Transform transform) => (Object)(object)transform != (Object)null && GetPath(transform).Equals(exactPath, StringComparison.Ordinal))); } private IEnumerator BypassKilnFogWallForJoinerIfNeeded(Segment targetSegment, string source) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if ((int)targetSegment != 3 || !IsPhotonInRoom() || IsPhotonMasterClient() || (Object)(object)Character.localCharacter == (Object)null) { yield break; } Campfire val = FindSourceCampfireForTargetSegment((Segment)3); Rigidbody val2 = FindBodyRigidbody("Hip"); if ((Object)(object)val == (Object)null || (Object)(object)val2 == (Object)null) { Log.LogWarning((object)$"KILN WALL BYPASS annulé : kilnCampfire={(Object)(object)val != (Object)null} | hip={(Object)(object)val2 != (Object)null} | source={source}"); yield break; } Vector3 kilnPosition = ((Component)val).transform.position; Vector3 position = val2.position; float num = Vector3.Distance(position, kilnPosition); bool flag = position.z > kilnPosition.z - 16f; if (num > 120f || !flag) { Log.LogInfo((object)$"KILN WALL BYPASS SKIP | source={source} | hip={position} | kiln={kilnPosition} | distance={num:0.00} | blockedSide={flag}"); yield break; } transitionBlackout = true; Log.LogWarning((object)$"KILN WALL BYPASS START | source={source} | hip={position} | kiln={kilnPosition} | le joiner est encore du côté bloqué"); yield return (object)new WaitForSeconds(0.15f); Vector3 val3 = kilnPosition + new Vector3(0.6f, 0f, -24f); _ = val3 + new Vector3(0f, 1.6f, 0f); Vector3 val6; try { Vector3 val4 = val3 + new Vector3(0f, 40f, 0f); RaycastHit val5 = default(RaycastHit); if (Physics.Raycast(val4, Vector3.down, ref val5, 100f, -1, (QueryTriggerInteraction)1)) { val6 = ((RaycastHit)(ref val5)).point + new Vector3(0f, 1.6f, 0f); Log.LogInfo((object)$"KILN WALL BYPASS GROUND | hit='{((Object)((RaycastHit)(ref val5)).collider).name}' | point={((RaycastHit)(ref val5)).point} | desiredHip={val6}"); } else { val6 = kilnPosition + new Vector3(0.6f, -3.3f, -22f); Log.LogWarning((object)$"KILN WALL BYPASS GROUND MISS | fallback desiredHip={val6}"); } } catch (Exception ex) { val6 = kilnPosition + new Vector3(0.6f, -3.3f, -22f); Log.LogWarning((object)$"KILN WALL BYPASS raycast erreur : {ex.Message} | fallback desiredHip={val6}"); } bool moved = MoveLocalCharacterBodyNetworkAligned(val6, "KILN WALL BYPASS " + source); yield return (object)new WaitForSeconds(0.2f); transitionBlackout = false; Rigidbody val7 = FindBodyRigidbody("Hip"); Log.LogWarning((object)string.Format("KILN WALL BYPASS END | moved={0} | finalHip={1} | source={2}", moved, ((Object)(object)val7 != (Object)null) ? ((object)val7.position/*cast due to .constrained prefix*/).ToString() : "null", source)); } private void TeleportToCurrentDescentCampfireForTesting() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_0060: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_0136: 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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_019c: 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_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)"========== Y DEBUG TP FEU DESCENTE =========="); try { if ((Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)"Character.localCharacter null. Lance une partie avant F10."); Log.LogInfo((object)"========== FIN Y DEBUG TP FEU DESCENTE =========="); return; } Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Campfire val = FindDebugDescentCampfireForCurrentSegment(currentSegmentNumber); if ((Object)(object)val == (Object)null) { Log.LogWarning((object)$"Aucun feu de descente actif trouvé pour le segment actuel : {currentSegmentNumber}"); Log.LogWarning((object)"Utilise F2 pour vérifier les campfires actifs."); Log.LogInfo((object)"========== FIN Y DEBUG TP FEU DESCENTE =========="); return; } Rigidbody val2 = FindBodyRigidbody("Hip"); if ((Object)(object)val2 == (Object)null) { Log.LogWarning((object)"Rigidbody Hip introuvable. Téléport F10 annulée."); Log.LogInfo((object)"========== FIN Y DEBUG TP FEU DESCENTE =========="); return; } Segment? forcedDescentTargetForCampfire = GetForcedDescentTargetForCampfire(val); Vector3 position = ((Component)val2).transform.position; if (!((Component)val).gameObject.activeInHierarchy) { bool flag = ActivateLocalDestinationBranchForSegment(currentSegmentNumber); Log.LogWarning((object)$"Y DEBUG BRANCH ACTIVATE | segment={currentSegmentNumber} | activated={flag} | path={GetPath(((Component)val).transform)}"); val = FindDebugDescentCampfireForCurrentSegment(currentSegmentNumber) ?? val; } Vector3 val3 = ((Component)val).transform.position + GetSafeDebugOffsetForCampfire(val); Log.LogInfo((object)$"Segment actuel={currentSegmentNumber} | feu cible={GetPath(((Component)val).transform)} | target={forcedDescentTargetForCampfire} | master={IsPhotonMasterClient()}"); Log.LogInfo((object)$"TP Y NETWORK-ALIGNED Hip : {position} -> {val3} | distance feu={Vector3.Distance(position, ((Component)val).transform.position):0.00}"); bool flag2 = MoveLocalCharacterBodyNetworkAligned(val3, $"Y DEBUG TP {currentSegmentNumber} -> {forcedDescentTargetForCampfire}"); Log.LogInfo((object)string.Format("Y DEBUG RESULT | moved={0} | finalHip={1} | master={2}", flag2, ((Object)(object)FindBodyRigidbody("Hip") != (Object)null) ? ((object)FindBodyRigidbody("Hip").position/*cast due to .constrained prefix*/).ToString() : "null", IsPhotonMasterClient())); Log.LogInfo((object)"========== FIN Y DEBUG TP FEU DESCENTE =========="); } catch (Exception arg) { Log.LogError((object)$"Erreur TeleportToCurrentDescentCampfireForTesting : {arg}"); Log.LogInfo((object)"========== FIN Y DEBUG TP FEU DESCENTE =========="); } } private Campfire? FindDebugDescentCampfireForCurrentSegment(Segment currentSegment) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_004e: 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) Campfire[] source = Resources.FindObjectsOfTypeAll(); Rigidbody val = FindBodyRigidbody("Hip"); Vector3 playerPos = (((Object)(object)val != (Object)null) ? ((Component)val).transform.position : (((Object)(object)Character.localCharacter != (Object)null) ? ((Component)Character.localCharacter).transform.position : Vector3.zero)); Campfire val2 = (from c in source where (Object)(object)c != (Object)null where ((Component)c).gameObject.activeInHierarchy where CampfireMatchesCurrentSegmentForDebug(c, currentSegment) orderby Vector3.Distance(playerPos, ((Component)c).transform.position) select c).FirstOrDefault(); if ((Object)(object)val2 != (Object)null) { return val2; } Campfire val3 = (from c in source where (Object)(object)c != (Object)null where GetPath(((Component)c).transform).StartsWith("Map/") where CampfireMatchesCurrentSegmentForDebug(c, currentSegment) orderby Vector3.Distance(playerPos, ((Component)c).transform.position) select c).FirstOrDefault(); if ((Object)(object)val3 != (Object)null) { Log.LogWarning((object)("Y : feu trouvé mais inactif dans la hiérarchie : " + GetPath(((Component)val3).transform))); } return val3; } private bool CampfireMatchesCurrentSegmentForDebug(Campfire campfire, Segment currentSegment) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected I4, but got Unknown string path = GetPath(((Component)campfire).transform); if (!path.StartsWith("Map/")) { return false; } switch ((int)currentSegment) { case 4: if (!path.Contains("Volcano_Campfire")) { return ((Object)((Component)campfire).gameObject).name.Contains("Kiln"); } return true; case 3: if (!path.Contains("Snow_Campfire") && !path.Contains("Biome_3")) { return path.Contains("Alpine"); } return true; case 2: if (!path.Contains("Roots_Campfire") && !path.Contains("Biome_2")) { return path.Contains("Roots"); } return true; case 1: return path.Contains("Beach_Campfire"); case 0: if (!path.Contains("crashed plane")) { return path.Contains("Beach_Segment"); } return true; default: return false; } } private Vector3 GetSafeDebugOffsetForCampfire(Campfire campfire) { //IL_0040: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) string path = GetPath(((Component)campfire).transform); if (path.Contains("Volcano_Campfire") || ((Object)((Component)campfire).gameObject).name.Contains("Kiln")) { return new Vector3(1.5f, 2.2f, 0f); } if (path.Contains("Snow_Campfire") || path.Contains("Biome_3") || path.Contains("Alpine")) { return new Vector3(1.5f, 2.2f, 0f); } if (path.Contains("Roots_Campfire") || path.Contains("Biome_2") || path.Contains("Roots")) { return new Vector3(1.5f, 2.2f, 0f); } if (path.Contains("Beach_Campfire")) { return new Vector3(1.5f, 2.2f, 0f); } if (!path.Contains("crashed plane")) { path.Contains("Beach_Segment"); } return new Vector3(1.5f, 2.2f, 0f); } private void PatchFlareActionForBeachFinale() { Log.LogInfo((object)"========== PATCH ACTION_FLARE FINALE PLAGE =========="); try { MethodInfo methodInfo = typeof(Character).Assembly.GetType("Action_Flare")?.GetMethod("RunAction", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (methodInfo == null) { Log.LogWarning((object)"Action_Flare.RunAction introuvable."); Log.LogInfo((object)"========== FIN PATCH ACTION_FLARE FINALE PLAGE =========="); return; } Type type = FindLoadedType("HarmonyLib.Harmony"); Type type2 = FindLoadedType("HarmonyLib.HarmonyMethod"); if (type == null || type2 == null) { Log.LogWarning((object)"HarmonyLib introuvable au runtime. Patch flare non installé."); Log.LogInfo((object)"========== FIN PATCH ACTION_FLARE FINALE PLAGE =========="); return; } harmonyInstance = Activator.CreateInstance(type, "Totodu4730.PeakToBeachReborn.FlareFinale"); MethodInfo method = typeof(Plugin).GetMethod("ActionFlareRunActionPostfix", BindingFlags.Static | BindingFlags.NonPublic); object obj = ((method == null) ? null : Activator.CreateInstance(type2, method)); MethodInfo methodInfo2 = type.GetMethods(BindingFlags.Instance | BindingFlags.Public).FirstOrDefault((MethodInfo m) => m.Name == "Patch" && m.GetParameters().Length == 5); if (harmonyInstance == null || obj == null || methodInfo2 == null) { Log.LogWarning((object)"Impossible de préparer Harmony.Patch pour Action_Flare.RunAction."); Log.LogInfo((object)"========== FIN PATCH ACTION_FLARE FINALE PLAGE =========="); return; } methodInfo2.Invoke(harmonyInstance, new object[5] { methodInfo, null, obj, null, null }); Log.LogInfo((object)"Patch installé : Action_Flare.RunAction -> finale plage automatique."); MethodInfo methodInfo3 = typeof(Character).Assembly.GetType("Flare")?.GetMethod("TriggerHelicopter", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); MethodInfo method2 = typeof(Plugin).GetMethod("FlareTriggerHelicopterPrefix", BindingFlags.Static | BindingFlags.NonPublic); object obj2 = ((method2 == null) ? null : Activator.CreateInstance(type2, method2)); if (methodInfo3 != null && obj2 != null) { methodInfo2.Invoke(harmonyInstance, new object[5] { methodInfo3, obj2, null, null, null }); Log.LogInfo((object)"Patch installé : Flare.TriggerHelicopter -> hélico vanilla bloqué pendant la route inversée."); } else { Log.LogWarning((object)"Patch Flare.TriggerHelicopter non installé : méthode ou prefix introuvable."); } MethodInfo methodInfo4 = (FindLoadedType("Photon.Pun.PhotonNetwork")?.GetProperty("IsMasterClient", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic))?.GetGetMethod(nonPublic: true); MethodInfo method3 = typeof(Plugin).GetMethod("PhotonIsMasterClientPrefix", BindingFlags.Static | BindingFlags.NonPublic); object obj3 = ((method3 == null) ? null : Activator.CreateInstance(type2, method3)); if (methodInfo4 != null && obj3 != null) { methodInfo2.Invoke(harmonyInstance, new object[5] { methodInfo4, obj3, null, null, null }); photonMasterGetterPatchInstalled = true; Log.LogInfo((object)"Patch installé : PhotonNetwork.IsMasterClient -> spoof local uniquement pendant les JumpToSegment host-like Caldera/Tropics/Beach du joiner."); } else { photonMasterGetterPatchInstalled = false; Log.LogWarning((object)"Patch PhotonNetwork.IsMasterClient non installé : getter ou prefix introuvable."); } } catch (Exception arg) { Log.LogError((object)$"Erreur PatchFlareActionForBeachFinale : {arg}"); } Log.LogInfo((object)"========== FIN PATCH ACTION_FLARE FINALE PLAGE =========="); } private Type? FindLoadedType(string fullName) { Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly in assemblies) { try { Type type = assembly.GetType(fullName, throwOnError: false); if (type != null) { return type; } } catch { } } return null; } private static bool PhotonIsMasterClientPrefix(ref bool __result) { try { Plugin instance = Instance; if ((Object)(object)instance == (Object)null || !instance.forcePhotonMasterForLocalCalderaJump) { return true; } __result = true; return false; } catch (Exception ex) { ManualLogSource log = Log; if (log != null) { log.LogWarning((object)("PhotonIsMasterClientPrefix erreur : " + ex.Message)); } return true; } } private static bool FlareTriggerHelicopterPrefix(object __instance) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) try { Plugin instance = Instance; if ((Object)(object)instance == (Object)null) { return true; } if (!instance.descentModeReady) { return true; } if (Time.time >= instance.nextFlareVanillaBlockLogAt) { instance.nextFlareVanillaBlockLogAt = Time.time + 1f; Log.LogInfo((object)$"FLARE VANILLA HELI BLOCKED | segment={MapHandler.CurrentSegmentNumber} | completed={instance.completedCampfirePaths.Count}"); } return false; } catch (Exception ex) { ManualLogSource log = Log; if (log != null) { log.LogWarning((object)("FlareTriggerHelicopterPrefix erreur : " + ex.Message)); } return true; } } private static void ActionFlareRunActionPostfix(object __instance) { try { Instance?.OnRealFlareActionUsed(__instance); } catch (Exception ex) { ManualLogSource log = Log; if (log != null) { log.LogWarning((object)("ActionFlareRunActionPostfix erreur : " + ex.Message)); } } } private void OnRealFlareActionUsed(object actionFlareInstance) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) if (!descentModeReady || beachFlareFinaleTriggered) { return; } if (!IsPlayerAllowedToTriggerBeachFinale(out string reason)) { if ((int)MapHandler.CurrentSegmentNumber == 0) { Log.LogInfo((object)("Flare utilisée, mais finale non déclenchée : " + reason)); } return; } try { object obj = actionFlareInstance.GetType().GetField("flare", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(actionFlareInstance); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(10.21f, 5.02f, -362.72f); Component val2 = (Component)((obj is Component) ? obj : null); if (val2 != null) { Vector3 position = val2.transform.position; float num = Vector3.Distance(position, val); if (num > 45f) { Log.LogInfo((object)$"FLARE UTILISÉE MAIS TROP LOIN DE L'AVION | flarePos={position} | distance={num:0.00}"); return; } Log.LogInfo((object)$"FLARE RÉELLE UTILISÉE PRÈS DE L'AVION | flare='{((Object)val2).name}' | flarePos={position} | distance={num:0.00}"); } else { Log.LogInfo((object)"Action_Flare.RunAction détecté près de l'avion. Validation par position joueur."); } beachFlareFinaleTriggered = true; if (IsPhotonInRoom() && photonEventBridgeInstalled) { if (IsPhotonMasterClient()) { StartMasterHelicopterNetworkSequence("FLARE LOCALE MASTER"); return; } bool flag = SendPhotonModEvent(172, 1, "MasterClient"); Log.LogInfo((object)$"Flare locale client -> demande hélico au Master | sent={flag}"); } else { if (IsPhotonInRoom() && !photonEventBridgeInstalled) { Log.LogWarning((object)"Bridge Photon absent pour la finale : fallback hélico local sur le client qui a utilisé la flare."); } ((MonoBehaviour)this).StartCoroutine(TriggerBeachFinaleFromRealFlare()); } } catch (Exception ex) { Log.LogWarning((object)("OnRealFlareActionUsed erreur : " + ex.Message)); } } private bool IsPlayerAllowedToTriggerBeachFinale(out string reason) { //IL_0023: 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) //IL_0029: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) reason = ""; try { if ((Object)(object)Character.localCharacter == (Object)null) { reason = "Character.localCharacter null"; return false; } Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; if ((int)currentSegmentNumber != 0) { reason = $"segment actuel={currentSegmentNumber}, attendu=Beach"; return false; } if (completedCampfirePaths.Count < 4) { reason = $"progression descente incomplète : completed={completedCampfirePaths.Count}/4"; return false; } Rigidbody val = FindBodyRigidbody("Hip"); Vector3 val2 = (((Object)(object)val != (Object)null) ? ((Component)val).transform.position : ((Component)Character.localCharacter).transform.position); Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(10.21f, 5.02f, -362.72f); float num = Vector3.Distance(val2, val3); if (num > 90f) { reason = $"trop loin de l'avion/feu final : distance={num:0.00}"; return false; } Log.LogInfo((object)$"Check finale OK | playerPos={val2} | distance avion/feu final={num:0.00}"); return true; } catch (Exception ex) { reason = ex.Message; return false; } } private void StartMasterHelicopterNetworkSequence(string source) { if (!IsPhotonInRoom()) { ((MonoBehaviour)this).StartCoroutine(TriggerBeachFinaleFromRealFlare()); return; } if (!IsPhotonMasterClient()) { Log.LogWarning((object)("StartMasterHelicopterNetworkSequence refusé : client non-master | source=" + source)); return; } if (helicopterNetworkSequenceRunning) { Log.LogWarning((object)("Séquence hélico réseau déjà en cours | source=" + source)); return; } helicopterNetworkSequenceRunning = true; beachFlareFinaleTriggered = true; ((MonoBehaviour)this).StartCoroutine(MasterHelicopterNetworkSequence(source)); } private IEnumerator MasterHelicopterNetworkSequence(string source) { Log.LogInfo((object)("========== MASTER HELICO NETWORK START | source=" + source + " ==========")); SendPhotonModEvent(173, 1, "Others"); peakSequencePreparedForNetwork = TryPreparePeakSequenceAtBeachForNetwork(); Log.LogInfo((object)$"MASTER préparation PeakSequence locale={peakSequencePreparedForNetwork}. Attente 1,5 s pour les autres clients."); yield return (object)new WaitForSeconds(1.5f); SendPhotonModEvent(174, 1, "Others"); bool flag = TrySummonPreparedPeakSequenceAtBeachForNetwork("MASTER LOCAL ACTIVATE"); Log.LogInfo((object)$"MASTER activation hélico locale={flag}"); yield return (object)new WaitForSeconds(1f); DumpPeakSequenceArrivalState("MULTI MASTER T+1s"); Log.LogInfo((object)"========== MASTER HELICO NETWORK DISPATCH COMPLETE =========="); } private bool TryPreparePeakSequenceAtBeachForNetwork() { //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_024a: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)$"========== PREPARE PEAKSEQUENCE NETWORK | master={IsPhotonMasterClient()} =========="); try { Type type = typeof(Character).Assembly.GetType("PeakHandler"); if (type == null) { Log.LogWarning((object)"Type PeakHandler introuvable."); return false; } Object[] array = Resources.FindObjectsOfTypeAll(type); if (array.Length == 0) { Log.LogWarning((object)"Aucun PeakHandler trouvé."); return false; } object obj = array[0]; FieldInfo field = type.GetField("peakSequence", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); object? obj2 = field?.GetValue(field.IsStatic ? null : obj); GameObject val = (GameObject)((obj2 is GameObject) ? obj2 : null); if ((Object)(object)val == (Object)null) { Log.LogWarning((object)"PeakHandler.peakSequence null."); return false; } Component val2 = ((IEnumerable)val.GetComponents()).FirstOrDefault((Func)((Component component) => (Object)(object)component != (Object)null && ((object)component).GetType().Name == "PeakSequence")); if ((Object)(object)val2 == (Object)null) { Log.LogWarning((object)"Composant PeakSequence introuvable."); return false; } Type type2 = ((object)val2).GetType(); FieldInfo field2 = type2.GetField("ropeSpawnPoint", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); object? obj3 = field2?.GetValue(field2.IsStatic ? null : val2); Transform val3 = (Transform)((obj3 is Transform) ? obj3 : null); if ((Object)(object)val3 == (Object)null) { Log.LogWarning((object)"PeakSequence.ropeSpawnPoint null."); return false; } Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(10.21f, 28f, -362.72f); Vector3 position = val3.position; Vector3 val5 = val4 - position; if (Vector3.Distance(position, val4) > 0.25f) { Vector3 position2 = val.transform.position; val.transform.position = position2 + val5; Physics.SyncTransforms(); Log.LogInfo((object)$"PREPARE PEAKSEQUENCE MOVE | oldRoot={position2} | newRoot={val.transform.position} | ropeBefore={position} | ropeAfter={val3.position} | master={IsPhotonMasterClient()}"); } else { Log.LogInfo((object)$"PREPARE PEAKSEQUENCE déjà aligné | ropeSpawnPoint={val3.position}"); } SetPeakSequenceFieldForTest(type2, val2, "waitTime", 0f); SetPeakSequenceFieldForTest(type2, val2, "timerElapsed", 0f); SetPeakSequenceFieldForTest(type2, val2, "secondsElapsed", 0); SetPeakSequenceFieldForTest(type2, val2, "spawnedRope", false); SetPeakSequenceFieldForTest(type2, val2, "endingGame", false); peakSequencePreparedForNetwork = true; Log.LogInfo((object)$"PREPARE PEAKSEQUENCE OK | master={IsPhotonMasterClient()} | ropeSpawnPoint={val3.position}"); Log.LogInfo((object)$"========== FIN PREPARE PEAKSEQUENCE NETWORK | master={IsPhotonMasterClient()} =========="); return true; } catch (Exception arg) { Log.LogWarning((object)$"TryPreparePeakSequenceAtBeachForNetwork impossible : {arg}"); return false; } } private bool TrySummonPreparedPeakSequenceAtBeachForNetwork(string source) { Log.LogInfo((object)$"========== ACTIVATE HELICO NETWORK | source={source} | master={IsPhotonMasterClient()} =========="); try { if (!peakSequencePreparedForNetwork) { Log.LogWarning((object)"PeakSequence non marqué préparé sur ce client. Nouvelle préparation locale de sécurité."); peakSequencePreparedForNetwork = TryPreparePeakSequenceAtBeachForNetwork(); } Type type = typeof(Character).Assembly.GetType("PeakHandler"); if (type == null) { return false; } Object[] array = Resources.FindObjectsOfTypeAll(type); if (array.Length == 0) { return false; } object obj = array[0]; FieldInfo field = type.GetField("summonedHelicopter", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (field != null) { field.SetValue(field.IsStatic ? null : obj, false); } MethodInfo method = type.GetMethod("SummonHelicopter", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method == null || method.GetParameters().Length != 0) { Log.LogWarning((object)"PeakHandler.SummonHelicopter() introuvable ou signature inattendue."); return false; } method.Invoke(method.IsStatic ? null : obj, null); Log.LogInfo((object)$"ACTIVATE HELICO OK | source={source} | master={IsPhotonMasterClient()}"); return true; } catch (TargetInvocationException ex) { Exception ex2 = ex.InnerException ?? ex; Log.LogWarning((object)("ACTIVATE HELICO invocation impossible | source=" + source + " | " + ex2.GetType().Name + " - " + ex2.Message)); return false; } catch (Exception ex3) { Log.LogWarning((object)("ACTIVATE HELICO impossible | source=" + source + " | " + ex3.Message)); return false; } } private IEnumerator TriggerBeachFinaleFromRealFlare() { Log.LogInfo((object)"========== TEST PEAKSEQUENCE HELICO PLAGE =========="); Log.LogInfo((object)"Flare réellement utilisée sur Beach près de l'avion."); Log.LogInfo((object)"MODE TEST : pas de Victory forcé et pas d'activation de la cinématique de fin."); Log.LogInfo((object)"On déplace uniquement PeakSequence / ropeSpawnPoint puis on laisse le délai vanilla de 18 secondes tourner."); if (!TryRelocateAndSummonHelicopterAtBeach()) { Log.LogWarning((object)"La tentative PeakSequence hélico plage a échoué."); Log.LogInfo((object)"========== FIN TEST PEAKSEQUENCE HELICO PLAGE =========="); yield break; } DumpPeakSequenceArrivalState("T+0s"); yield return (object)new WaitForSeconds(1f); DumpPeakSequenceArrivalState("T+1s"); yield return (object)new WaitForSeconds(9f); DumpPeakSequenceArrivalState("T+10s"); yield return (object)new WaitForSeconds(7f); DumpPeakSequenceArrivalState("T+17s"); yield return (object)new WaitForSeconds(2f); DumpPeakSequenceArrivalState("T+19s"); yield return (object)new WaitForSeconds(6f); DumpPeakSequenceArrivalState("T+25s"); yield return (object)new WaitForSeconds(10f); DumpPeakSequenceArrivalState("T+35s"); Log.LogInfo((object)"Test PeakSequence terminé après 35 secondes. Aucun écran Victory forcé."); Log.LogInfo((object)"========== FIN TEST PEAKSEQUENCE HELICO PLAGE =========="); } private bool TryRelocateAndSummonHelicopterAtBeach() { //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)"========== RELOCALISATION PEAKSEQUENCE VERS BEACH =========="); try { Type type = typeof(Character).Assembly.GetType("PeakHandler"); if (type == null) { Log.LogWarning((object)"Type PeakHandler introuvable."); return false; } Object[] array = Resources.FindObjectsOfTypeAll(type); if (array.Length == 0) { Log.LogWarning((object)"Aucun PeakHandler trouvé."); return false; } object obj = array[0]; FieldInfo field = type.GetField("summonedHelicopter", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = type.GetField("peakSequence", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field3 = type.GetField("endCutscene", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field4 = type.GetField("endCutsceneAnimator", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); object? obj2 = field2?.GetValue(field2.IsStatic ? null : obj); GameObject val = (GameObject)((obj2 is GameObject) ? obj2 : null); object? obj3 = field3?.GetValue(field3.IsStatic ? null : obj); GameObject val2 = (GameObject)((obj3 is GameObject) ? obj3 : null); object? obj4 = field4?.GetValue(field4.IsStatic ? null : obj); Animator val3 = (Animator)((obj4 is Animator) ? obj4 : null); if ((Object)(object)val == (Object)null) { Log.LogWarning((object)"PeakHandler.peakSequence null."); return false; } Component val4 = ((IEnumerable)val.GetComponents()).FirstOrDefault((Func)((Component c) => (Object)(object)c != (Object)null && ((object)c).GetType().Name == "PeakSequence")); if ((Object)(object)val4 == (Object)null) { Log.LogWarning((object)"Composant PeakSequence introuvable."); return false; } Type type2 = ((object)val4).GetType(); FieldInfo field5 = type2.GetField("ropeSpawnPoint", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); object? obj5 = field5?.GetValue(field5.IsStatic ? null : val4); Transform val5 = (Transform)((obj5 is Transform) ? obj5 : null); if ((Object)(object)val5 == (Object)null) { Log.LogWarning((object)"PeakSequence.ropeSpawnPoint null."); return false; } Vector3 position = val.transform.position; Vector3 position2 = val5.position; Vector3 val6 = default(Vector3); ((Vector3)(ref val6))..ctor(10.21f, 28f, -362.72f); Vector3 val7 = val6 - position2; Log.LogInfo((object)("PeakSequence path=" + GetPath(val.transform))); Log.LogInfo((object)$"PeakSequence root AVANT={position}"); Log.LogInfo((object)$"Rope SpawnPoint AVANT={position2}"); Log.LogInfo((object)$"Rope SpawnPoint CIBLE={val6}"); Log.LogInfo((object)$"Delta PeakSequence={val7}"); val.transform.position = position + val7; Physics.SyncTransforms(); Log.LogInfo((object)$"PeakSequence root APRES={val.transform.position}"); Log.LogInfo((object)$"Rope SpawnPoint APRES={val5.position}"); if ((Object)(object)val2 != (Object)null) { Log.LogInfo((object)$"CutsceneEndingSpot LAISSÉ INTACT | pos={val2.transform.position} | activeSelf={val2.activeSelf} | activeInHierarchy={val2.activeInHierarchy} | path={GetPath(val2.transform)}"); } if ((Object)(object)val3 != (Object)null) { Log.LogInfo((object)$"Helicopter_End LAISSÉ INACTIF/INTACT | pos={((Component)val3).transform.position} | activeSelf={((Component)val3).gameObject.activeSelf} | activeInHierarchy={((Component)val3).gameObject.activeInHierarchy} | path={GetPath(((Component)val3).transform)}"); } SetPeakSequenceFieldForTest(type2, val4, "waitTime", 0f); SetPeakSequenceFieldForTest(type2, val4, "timerElapsed", 0f); SetPeakSequenceFieldForTest(type2, val4, "secondsElapsed", 0); SetPeakSequenceFieldForTest(type2, val4, "spawnedRope", false); SetPeakSequenceFieldForTest(type2, val4, "endingGame", false); if (field != null) { field.SetValue(field.IsStatic ? null : obj, false); Log.LogInfo((object)"PeakHandler.summonedHelicopter forcé à false avant SummonHelicopter()."); } MethodInfo method = type.GetMethod("SummonHelicopter", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method == null || method.GetParameters().Length != 0) { Log.LogWarning((object)"PeakHandler.SummonHelicopter() introuvable ou signature inattendue."); return false; } Log.LogInfo((object)"Invocation PeakHandler.SummonHelicopter() après déplacement de PeakSequence uniquement..."); method.Invoke(method.IsStatic ? null : obj, null); Physics.SyncTransforms(); Log.LogInfo((object)$"SummonHelicopter invoqué | PeakSequence activeSelf={val.activeSelf} | activeInHierarchy={val.activeInHierarchy}"); Log.LogInfo((object)"Aucune activation forcée de CutsceneEndingSpot ou Helicopter_End."); Log.LogInfo((object)"========== FIN RELOCALISATION PEAKSEQUENCE VERS BEACH =========="); return true; } catch (TargetInvocationException ex) { Exception ex2 = ex.InnerException ?? ex; Log.LogWarning((object)("TryRelocateAndSummonHelicopterAtBeach invocation impossible : " + ex2.GetType().Name + " - " + ex2.Message)); Log.LogInfo((object)"========== FIN RELOCALISATION PEAKSEQUENCE VERS BEACH =========="); return false; } catch (Exception arg) { Log.LogWarning((object)$"TryRelocateAndSummonHelicopterAtBeach impossible : {arg}"); Log.LogInfo((object)"========== FIN RELOCALISATION PEAKSEQUENCE VERS BEACH =========="); return false; } } private void SetPeakSequenceFieldForTest(Type type, object instance, string fieldName, object value) { try { FieldInfo field = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (!(field == null)) { object obj = (field.IsStatic ? null : instance); object value2 = field.GetValue(obj); field.SetValue(obj, value); Log.LogInfo((object)$"PeakSequence reset | {fieldName}: {value2} -> {value}"); } } catch (Exception ex) { Log.LogWarning((object)("PeakSequence reset impossible | " + fieldName + " | " + ex.Message)); } } private void DumpPeakSequenceArrivalState(string label) { //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)("========== PEAKSEQUENCE ARRIVAL STATE " + label + " ==========")); try { Type type = typeof(Character).Assembly.GetType("PeakHandler"); if (type == null) { return; } Object[] array = Resources.FindObjectsOfTypeAll(type); if (array.Length == 0) { return; } object obj = array[0]; FieldInfo field = type.GetField("peakSequence", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); object? obj2 = field?.GetValue(field.IsStatic ? null : obj); GameObject val = (GameObject)((obj2 is GameObject) ? obj2 : null); if ((Object)(object)val == (Object)null) { return; } Component val2 = ((IEnumerable)val.GetComponents()).FirstOrDefault((Func)((Component c) => (Object)(object)c != (Object)null && ((object)c).GetType().Name == "PeakSequence")); if ((Object)(object)val2 == (Object)null) { return; } Type type2 = ((object)val2).GetType(); Log.LogInfo((object)$"PeakSequence GO | pos={val.transform.position} | activeSelf={val.activeSelf} | activeInHierarchy={val.activeInHierarchy} | path={GetPath(val.transform)}"); string[] array2 = new string[14] { "view", "ropeAnchorWithRopePref", "ropeSpawnPoint", "waitTime", "timeToWait", "totalSeconds", "totalWinningSeconds", "lengthOfASecond", "spawnedRope", "ropeAnchorInstance", "ropeInstance", "timerElapsed", "secondsElapsed", "endingGame" }; string[] array3 = array2; foreach (string text in array3) { FieldInfo field2 = type2.GetField(text, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (field2 == null) { continue; } object value = field2.GetValue(field2.IsStatic ? null : val2); Component val3 = (Component)((value is Component) ? value : null); if (val3 != null) { Log.LogInfo((object)$"PeakSequence FIELD | {text}={((object)val3).GetType().Name} '{((Object)val3).name}' | pos={val3.transform.position} | active={val3.gameObject.activeInHierarchy} | path={GetPath(val3.transform)}"); continue; } GameObject val4 = (GameObject)((value is GameObject) ? value : null); if (val4 != null) { Log.LogInfo((object)$"PeakSequence FIELD | {text}=GameObject '{((Object)val4).name}' | pos={val4.transform.position} | activeSelf={val4.activeSelf} | activeInHierarchy={val4.activeInHierarchy} | path={GetPath(val4.transform)}"); continue; } Transform val5 = (Transform)((value is Transform) ? value : null); if (val5 != null) { Log.LogInfo((object)$"PeakSequence FIELD | {text}=Transform '{((Object)val5).name}' | pos={val5.position} | active={((Component)val5).gameObject.activeInHierarchy} | path={GetPath(val5)}"); } else { Log.LogInfo((object)$"PeakSequence FIELD | {text}={value}"); } } Transform[] array4 = (from t in (from t in Resources.FindObjectsOfTypeAll() where (Object)(object)t != (Object)null select t).Where(delegate(Transform t) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) Scene scene = ((Component)t).gameObject.scene; return ((Scene)(ref scene)).IsValid(); }) where ((Object)t).name.IndexOf("RopeAnchorHelicopter", StringComparison.OrdinalIgnoreCase) >= 0 || ((Object)t).name.IndexOf("Helicopter", StringComparison.OrdinalIgnoreCase) >= 0 || ((Object)t).name.IndexOf("Rope", StringComparison.OrdinalIgnoreCase) >= 0 where Vector3.Distance(t.position, new Vector3(10.21f, 28f, -362.72f)) < 120f orderby Vector3.Distance(t.position, new Vector3(10.21f, 28f, -362.72f)) select t).Take(40).ToArray(); Log.LogInfo((object)$"Objets Rope/Helicopter proches du SpawnPoint plage : {array4.Length}"); Transform[] array5 = array4; foreach (Transform val6 in array5) { float num3 = Vector3.Distance(val6.position, new Vector3(10.21f, 28f, -362.72f)); Log.LogInfo((object)$"ARRIVAL OBJ | name='{((Object)val6).name}' | pos={val6.position} | distanceSpawn={num3:0.00} | activeSelf={((Component)val6).gameObject.activeSelf} | activeInHierarchy={((Component)val6).gameObject.activeInHierarchy} | path={GetPath(val6)}"); } } catch (Exception ex) { Log.LogWarning((object)("DumpPeakSequenceArrivalState impossible : " + ex.Message)); } Log.LogInfo((object)("========== FIN PEAKSEQUENCE ARRIVAL STATE " + label + " ==========")); } private void ForceGameObjectAndParentsActive(GameObject gameObject) { try { Transform val = gameObject.transform; while ((Object)(object)val != (Object)null) { if (!((Component)val).gameObject.activeSelf) { ((Component)val).gameObject.SetActive(true); Log.LogInfo((object)("ACTIVATE PARENT/GO | name='" + ((Object)val).name + "' | path=" + GetPath(val))); } val = val.parent; } } catch (Exception ex) { Log.LogWarning((object)("ForceGameObjectAndParentsActive impossible : " + ex.Message)); } } private void ForceChildrenActive(Transform root) { try { Transform[] componentsInChildren = ((Component)root).GetComponentsInChildren(true); Transform[] array = componentsInChildren; foreach (Transform val in array) { if (!((Object)(object)val == (Object)null) && !((Component)val).gameObject.activeSelf) { ((Component)val).gameObject.SetActive(true); Log.LogInfo((object)("ACTIVATE CHILD | name='" + ((Object)val).name + "' | path=" + GetPath(val))); } } } catch (Exception ex) { Log.LogWarning((object)("ForceChildrenActive impossible : " + ex.Message)); } } private void ForceRenderersEnabled(Transform root) { try { Renderer[] componentsInChildren = ((Component)root).GetComponentsInChildren(true); Log.LogInfo((object)$"Renderers sous '{((Object)root).name}' : {componentsInChildren.Length}"); Renderer[] array = componentsInChildren; foreach (Renderer val in array) { if (!((Object)(object)val == (Object)null)) { if (!val.enabled) { val.enabled = true; } Log.LogInfo((object)$"RENDERER FORCE ON | type={((object)val).GetType().Name} | name='{((Object)val).name}' | active={((Component)val).gameObject.activeInHierarchy} | enabled={val.enabled} | path={GetPath(((Component)val).transform)}"); } } } catch (Exception ex) { Log.LogWarning((object)("ForceRenderersEnabled impossible : " + ex.Message)); } } private void DumpBeachHelicopterVisualState(string label) { //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)("========== HELICO VISUEL STATE " + label + " ==========")); try { Type type = typeof(Character).Assembly.GetType("PeakHandler"); if (type == null) { Log.LogWarning((object)"PeakHandler type introuvable."); return; } Object[] array = Resources.FindObjectsOfTypeAll(type); if (array.Length == 0) { Log.LogWarning((object)"Aucun PeakHandler trouvé."); return; } object obj = array[0]; FieldInfo field = type.GetField("peakSequence", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = type.GetField("endCutscene", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field3 = type.GetField("endCutsceneAnimator", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); object? obj2 = field?.GetValue(field.IsStatic ? null : obj); GameObject val = (GameObject)((obj2 is GameObject) ? obj2 : null); object? obj3 = field2?.GetValue(field2.IsStatic ? null : obj); GameObject val2 = (GameObject)((obj3 is GameObject) ? obj3 : null); object? obj4 = field3?.GetValue(field3.IsStatic ? null : obj); Animator val3 = (Animator)((obj4 is Animator) ? obj4 : null); if ((Object)(object)val != (Object)null) { Log.LogInfo((object)$"PeakSequence | pos={val.transform.position} | activeSelf={val.activeSelf} | activeInHierarchy={val.activeInHierarchy} | path={GetPath(val.transform)}"); } if ((Object)(object)val2 != (Object)null) { Log.LogInfo((object)$"EndCutscene | pos={val2.transform.position} | activeSelf={val2.activeSelf} | activeInHierarchy={val2.activeInHierarchy} | path={GetPath(val2.transform)}"); } if ((Object)(object)val3 != (Object)null) { Log.LogInfo((object)$"Helicopter_End | pos={((Component)val3).transform.position} | rot={((Component)val3).transform.eulerAngles} | activeSelf={((Component)val3).gameObject.activeSelf} | activeInHierarchy={((Component)val3).gameObject.activeInHierarchy} | animatorEnabled={((Behaviour)val3).enabled} | path={GetPath(((Component)val3).transform)}"); Renderer[] componentsInChildren = ((Component)val3).GetComponentsInChildren(true); Log.LogInfo((object)$"Helicopter_End renderers={componentsInChildren.Length}"); foreach (Renderer item in componentsInChildren.Take(30)) { if (!((Object)(object)item == (Object)null)) { Log.LogInfo((object)$"HELI RENDERER | type={((object)item).GetType().Name} | name='{((Object)item).name}' | pos={((Component)item).transform.position} | activeSelf={((Component)item).gameObject.activeSelf} | activeInHierarchy={((Component)item).gameObject.activeInHierarchy} | enabled={item.enabled} | path={GetPath(((Component)item).transform)}"); } } } } catch (Exception ex) { Log.LogWarning((object)("DumpBeachHelicopterVisualState impossible : " + ex.Message)); } Log.LogInfo((object)("========== FIN HELICO VISUEL STATE " + label + " ==========")); } private bool ForceEndgameWinFromBeach(string source) { Log.LogInfo((object)("----- Force EndgameCounter.Win | source=" + source + " -----")); if (!IsPlayerAllowedToTriggerBeachFinale(out string reason)) { Log.LogWarning((object)("EndgameCounter.Win annulé : " + reason)); return false; } try { Type type = typeof(Character).Assembly.GetType("EndgameCounter"); if (type == null) { Log.LogWarning((object)"Type EndgameCounter introuvable."); return false; } Object[] array = Resources.FindObjectsOfTypeAll(type); Log.LogInfo((object)$"EndgameCounter trouvés : {array.Length}"); MethodInfo method = type.GetMethod("Win", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { Log.LogWarning((object)"EndgameCounter.Win introuvable."); return false; } if (method.GetParameters().Length != 0) { Log.LogWarning((object)$"EndgameCounter.Win trouvé mais paramètres={method.GetParameters().Length}, invocation annulée."); return false; } if (method.IsStatic) { method.Invoke(null, null); Log.LogInfo((object)"EndgameCounter.Win() static invoqué."); return true; } if (array.Length == 0) { Log.LogWarning((object)"Aucune instance EndgameCounter trouvée."); return false; } Object[] array2 = array; foreach (Object val in array2) { if (!(val == (Object)null)) { try { Component val2 = (Component)(object)((val is Component) ? val : null); string text = ((val2 != null) ? GetPath(val2.transform) : val.name); Log.LogInfo((object)("Invocation EndgameCounter.Win() sur '" + val.name + "' path=" + text)); method.Invoke(val, null); Log.LogInfo((object)"EndgameCounter.Win() invoqué avec succès."); return true; } catch (Exception ex) { Log.LogWarning((object)("Invocation EndgameCounter.Win impossible sur '" + val.name + "' : " + ex.Message)); } } } return false; } catch (Exception arg) { Log.LogError((object)$"Erreur ForceEndgameWinFromBeach : {arg}"); return false; } } private bool TryPeakHandlerEndCutsceneFallback() { Log.LogInfo((object)"----- Fallback PeakHandler.EndCutscene -----"); try { Type type = typeof(Character).Assembly.GetType("PeakHandler"); if (type == null) { Log.LogWarning((object)"Type PeakHandler introuvable."); return false; } Object[] array = Resources.FindObjectsOfTypeAll(type); Log.LogInfo((object)$"PeakHandler trouvés : {array.Length}"); if (array.Length == 0) { return false; } object obj = array[0]; MethodInfo method = type.GetMethod("EndCutscene", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { Log.LogWarning((object)"PeakHandler.EndCutscene introuvable."); return false; } if (method.GetParameters().Length != 0) { Log.LogWarning((object)$"PeakHandler.EndCutscene trouvé mais paramètres={method.GetParameters().Length}, invocation annulée."); return false; } method.Invoke(method.IsStatic ? null : obj, null); Log.LogInfo((object)"PeakHandler.EndCutscene() invoqué."); return true; } catch (Exception ex) { Log.LogWarning((object)("TryPeakHandlerEndCutsceneFallback impossible : " + ex.Message)); return false; } } private void TrySummonHelicopterFromBeachForTesting() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00a6: 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) Log.LogInfo((object)"========== TEST ENDGAME K : SUMMON HELICOPTER =========="); try { if ((Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)"Character.localCharacter null. Lance une partie avant K."); Log.LogInfo((object)"========== FIN TEST ENDGAME K =========="); return; } Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Rigidbody val = FindBodyRigidbody("Hip"); Vector3 val2 = (((Object)(object)val != (Object)null) ? ((Component)val).transform.position : ((Component)Character.localCharacter).transform.position); Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(11.71f, 7.22f, -362.72f); float num = Vector3.Distance(val2, val3); Log.LogInfo((object)$"Segment actuel={currentSegmentNumber} | playerPos={val2} | distance plage/avion={num:0.00}"); if ((int)currentSegmentNumber != 0) { Log.LogWarning((object)"K annulé : on n'est pas sur Beach."); Log.LogInfo((object)"========== FIN TEST ENDGAME K =========="); return; } if (num > 90f) { Log.LogWarning((object)"K annulé : trop loin de l'avion/feu final de la plage. Va près du campfire crash plane puis reteste."); Log.LogInfo((object)"========== FIN TEST ENDGAME K =========="); return; } Type type = typeof(Character).Assembly.GetType("PeakHandler"); if (type == null) { Log.LogWarning((object)"Type PeakHandler introuvable."); Log.LogInfo((object)"========== FIN TEST ENDGAME K =========="); return; } Object[] array = Resources.FindObjectsOfTypeAll(type); Log.LogInfo((object)$"PeakHandler trouvés : {array.Length}"); if (array.Length == 0) { Log.LogWarning((object)"Aucun PeakHandler trouvé."); Log.LogInfo((object)"========== FIN TEST ENDGAME K =========="); return; } object obj = array[0]; DumpPeakHandlerSmall(obj, type, "AVANT"); MethodInfo method = type.GetMethod("SummonHelicopter", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method == null) { Log.LogWarning((object)"Méthode PeakHandler.SummonHelicopter introuvable."); Log.LogInfo((object)"========== FIN TEST ENDGAME K =========="); return; } Log.LogInfo((object)"Invocation PeakHandler.SummonHelicopter()..."); method.Invoke(method.IsStatic ? null : obj, null); Log.LogInfo((object)"Invocation PeakHandler.SummonHelicopter() terminée."); DumpPeakHandlerSmall(obj, type, "APRES"); Log.LogInfo((object)"Si la séquence démarre, attends 20-40 secondes pour voir si le jeu ouvre l'écran de fin."); } catch (Exception arg) { Log.LogError((object)$"Erreur TrySummonHelicopterFromBeachForTesting : {arg}"); } Log.LogInfo((object)"========== FIN TEST ENDGAME K =========="); } private void DumpPeakHandlerSmall(object handler, Type peakHandlerType, string label) { try { Log.LogInfo((object)("----- PeakHandler " + label + " -----")); string[] array = new string[7] { "summonedHelicopter", "peakSequence", "endCutscene", "endCutsceneAnimator", "secondsUntilEndscreen", "isPlayingCinematic", "endScreenComplete" }; string[] array2 = array; foreach (string text in array2) { FieldInfo field = peakHandlerType.GetField(text, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (!(field == null)) { object value = field.GetValue(field.IsStatic ? null : handler); object obj; if (value != null) { Object val = (Object)((value is Object) ? value : null); obj = ((val != null) ? (((object)val).GetType().Name + " '" + val.name + "'") : (value.ToString() ?? "null")); } else { obj = "null"; } string text2 = (string)obj; Log.LogInfo((object)("PeakHandler " + label + " | " + text + " = " + text2)); } } FieldInfo field2 = peakHandlerType.GetField("peakSequence", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); object obj2 = field2?.GetValue(field2.IsStatic ? null : handler); GameObject val2 = (GameObject)((obj2 is GameObject) ? obj2 : null); if (val2 == null) { return; } Log.LogInfo((object)$"PeakSequence GO activeSelf={val2.activeSelf} activeInHierarchy={val2.activeInHierarchy} path={GetPath(val2.transform)}"); Component[] components = val2.GetComponents(); Component[] array3 = components; foreach (Component val3 in array3) { if (!((Object)(object)val3 == (Object)null) && !(((object)val3).GetType().Name != "PeakSequence")) { DumpPeakSequenceSmall(val3, ((object)val3).GetType(), label); } } } catch (Exception ex) { Log.LogWarning((object)("DumpPeakHandlerSmall impossible : " + ex.Message)); } } private void DumpPeakSequenceSmall(object peakSequence, Type peakSequenceType, string label) { try { string[] array = new string[8] { "waitTime", "timeToWait", "totalSeconds", "totalWinningSeconds", "spawnedRope", "timerElapsed", "secondsElapsed", "endingGame" }; string[] array2 = array; foreach (string text in array2) { FieldInfo field = peakSequenceType.GetField(text, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (!(field == null)) { object value = field.GetValue(field.IsStatic ? null : peakSequence); Log.LogInfo((object)$"PeakSequence {label} | {text} = {value}"); } } } catch (Exception ex) { Log.LogWarning((object)("DumpPeakSequenceSmall impossible : " + ex.Message)); } } private void DumpCampfires() { //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) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)"========== DUMP CAMPFIRES =========="); try { Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Log.LogInfo((object)$"Segment actuel : {currentSegmentNumber} ({Convert.ToInt32(currentSegmentNumber)})"); Campfire[] array = Resources.FindObjectsOfTypeAll(); Log.LogInfo((object)$"Nombre de Campfire trouvés : {array.Length}"); FieldInfo field = typeof(Campfire).GetField("advanceToSegment", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo field2 = typeof(Campfire).GetField("state", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); int num = 0; Campfire[] array2 = array; foreach (Campfire val in array2) { if (!((Object)(object)val == (Object)null)) { num++; string text = (((Component)val).gameObject.activeInHierarchy ? "ACTIVE" : "inactive"); string text2 = ((!(field != null)) ? "unknown" : (field.GetValue(val)?.ToString() ?? "null")); string text3 = ((!(field2 != null)) ? "unknown" : (field2.GetValue(val)?.ToString() ?? "null")); Log.LogInfo((object)$"CAMPFIRE {num} | {text} | name='{((Object)((Component)val).gameObject).name}' | pos={((Component)val).transform.position} | advanceToSegment={text2} | state={text3} | path={GetPath(((Component)val).transform)}"); } } } catch (Exception arg) { Log.LogError((object)$"Erreur DumpCampfires : {arg}"); } Log.LogInfo((object)"========== FIN DUMP CAMPFIRES =========="); } private void DumpHazardObjects() { Log.LogInfo((object)"========== DUMP HAZARD / LAVA / DAMAGE OBJECTS =========="); Log.LogInfo((object)"DumpHazardObjects conservé comme outil de diagnostic interne."); Log.LogInfo((object)"========== FIN DUMP HAZARD / LAVA / DAMAGE OBJECTS =========="); } private void DumpNearestCampfireDeep() { //IL_0072: 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) //IL_0077: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)"========== DUMP NEAREST CAMPFIRE DEEP =========="); try { if ((Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)"Character.localCharacter null."); Log.LogInfo((object)"========== FIN DUMP NEAREST CAMPFIRE DEEP =========="); return; } Rigidbody val = FindBodyRigidbody("Hip"); Vector3 playerPos = (((Object)(object)val != (Object)null) ? ((Component)val).transform.position : ((Component)Character.localCharacter).transform.position); Campfire[] source = Resources.FindObjectsOfTypeAll(); List list = (from c in source where (Object)(object)c != (Object)null where GetPath(((Component)c).transform).StartsWith("Map/") orderby Vector3.Distance(playerPos, ((Component)c).transform.position) select c).Take(5).ToList(); Log.LogInfo((object)$"Position joueur utilisée = {playerPos}"); Log.LogInfo((object)$"Nombre de campfires Map proches trouvés = {list.Count}"); int num = 0; foreach (Campfire item in list) { num++; float num2 = Vector3.Distance(playerPos, ((Component)item).transform.position); Log.LogInfo((object)$"----- CAMPFIRE PROCHE #{num} -----"); Log.LogInfo((object)$"name='{((Object)((Component)item).gameObject).name}' | activeSelf={((Component)item).gameObject.activeSelf} | activeInHierarchy={((Component)item).gameObject.activeInHierarchy}"); Log.LogInfo((object)$"pos={((Component)item).transform.position} | distance={num2:0.00} | path={GetPath(((Component)item).transform)}"); DumpObjectFields(item); DumpObjectMethods(item); DumpTransformTree(((Component)item).transform, 0, 4); } } catch (Exception arg) { Log.LogError((object)$"Erreur DumpNearestCampfireDeep : {arg}"); } Log.LogInfo((object)"========== FIN DUMP NEAREST CAMPFIRE DEEP =========="); } private void DumpObjectFields(object obj) { Type type = obj.GetType(); Log.LogInfo((object)("--- FIELDS " + type.FullName + " ---")); FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo[] array = fields; foreach (FieldInfo fieldInfo in array) { try { object value = fieldInfo.GetValue(fieldInfo.IsStatic ? null : obj); object obj2; if (value != null) { Object val = (Object)((value is Object) ? value : null); obj2 = ((val != null) ? (((object)val).GetType().Name + " '" + val.name + "'") : (value.ToString() ?? "null")); } else { obj2 = "null"; } string text = (string)obj2; Log.LogInfo((object)("FIELD " + fieldInfo.FieldType.Name + " " + fieldInfo.Name + " = " + text)); } catch (Exception ex) { Log.LogInfo((object)("FIELD " + fieldInfo.FieldType.Name + " " + fieldInfo.Name + " = ")); } } } private void DumpObjectMethods(object obj) { Type type = obj.GetType(); Log.LogInfo((object)("--- METHODS " + type.FullName + " ---")); MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); string[] source = new string[13] { "light", "ignite", "extinguish", "interact", "use", "activate", "enable", "disable", "rpc", "camp", "fire", "wood", "burn" }; MethodInfo[] array = methods; foreach (MethodInfo method in array) { if (source.Any((string k) => method.Name.IndexOf(k, StringComparison.OrdinalIgnoreCase) >= 0)) { string text = string.Join(", ", from p in method.GetParameters() select p.ParameterType.Name + " " + p.Name); string text2 = (method.IsStatic ? "static " : ""); Log.LogInfo((object)("METHOD " + text2 + method.ReturnType.Name + " " + method.Name + "(" + text + ")")); } } } private void DumpTransformTree(Transform root, int depth, int maxDepth) { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)root == (Object)null) && depth <= maxDepth) { string text = new string(' ', depth * 2); Component[] components = ((Component)root).GetComponents(); string text2 = string.Join(", ", from c in components where (Object)(object)c != (Object)null select ((object)c).GetType().Name); Log.LogInfo((object)$"{text}CHILD depth={depth} | name='{((Object)root).name}' | activeSelf={((Component)root).gameObject.activeSelf} | activeInHierarchy={((Component)root).gameObject.activeInHierarchy} | pos={root.position} | components=[{text2}] | path={GetPath(root)}"); for (int num = 0; num < root.childCount; num++) { DumpTransformTree(root.GetChild(num), depth + 1, maxDepth); } } } private void TryJumpToSegment(string segmentName) { //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_003c: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) Log.LogInfo((object)("Tentative JumpToSegment direct : " + segmentName)); if (!Enum.TryParse(segmentName, out Segment result)) { Log.LogError((object)("Segment introuvable : " + segmentName)); return; } try { Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; if (currentSegmentNumber == result) { Log.LogWarning((object)$"JumpToSegment annulé : tu es déjà sur le segment {result}."); return; } MapHandler.JumpToSegment(result); Log.LogInfo((object)$"JumpToSegment direct lancé vers : {result}"); } catch (Exception arg) { Log.LogError((object)$"Erreur pendant JumpToSegment direct ({segmentName}) : {arg}"); } } private void LogCurrentSegment() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: 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) //IL_0016: Unknown result type (might be due to invalid IL or missing references) try { Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Log.LogInfo((object)$"Segment actuel : {currentSegmentNumber} ({Convert.ToInt32(currentSegmentNumber)})"); } catch (Exception arg) { Log.LogError((object)$"Impossible de lire le segment actuel : {arg}"); } } private void DumpCurrentSegmentObjects() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)"========== OBJETS HAUTS DE LA SCENE =========="); try { Segment currentSegmentNumber = MapHandler.CurrentSegmentNumber; Log.LogInfo((object)$"Segment actuel : {currentSegmentNumber} ({Convert.ToInt32(currentSegmentNumber)})"); Transform[] source = Resources.FindObjectsOfTypeAll(); string[] keywords = new string[28] { "spawn", "camp", "fire", "campfire", "start", "end", "exit", "entrance", "checkpoint", "respawn", "peak", "kiln", "player", "transition", "finish", "win", "goal", "helicopter", "heli", "summit", "top", "final", "bing", "bong", "rescue", "flare", "box", "flag" }; List list = (from t in source.Where((Transform t) => (Object)(object)t != (Object)null).Where(delegate(Transform t) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) Scene scene = ((Component)t).gameObject.scene; return ((Scene)(ref scene)).IsValid(); }) where ((Component)t).gameObject.activeInHierarchy where keywords.Any((string k) => ((Object)t).name.ToLowerInvariant().Contains(k)) orderby t.position.y descending select t).Take(120).ToList(); int num = 0; foreach (Transform item in list) { num++; Log.LogInfo((object)$"OBJ {num} | name='{((Object)item).name}' | y={item.position.y:0.00} | pos={item.position} | path={GetPath(item)}"); } Log.LogInfo((object)$"Nombre d'objets candidats trouvés : {num}"); } catch (Exception arg) { Log.LogError((object)$"Erreur DumpCurrentSegmentObjects : {arg}"); } Log.LogInfo((object)"========== FIN OBJETS HAUTS =========="); } private void DumpCharacterMethods() { Log.LogInfo((object)"========== METHODES CHARACTER =========="); DumpType(typeof(Character), new string[7] { "Warp", "Teleport", "Move", "Position", "Spawn", "Ragdoll", "Velocity" }); Log.LogInfo((object)"========== FIN METHODES CHARACTER =========="); } private void DumpType(Type type, string[] filters) { Log.LogInfo((object)("--- Type : " + type.FullName + " ---")); MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); MethodInfo[] array = methods; foreach (MethodInfo method in array) { if (filters.Any((string filter) => method.Name.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0)) { string text = string.Join(", ", from p in method.GetParameters() select p.ParameterType.Name + " " + p.Name); string text2 = (method.IsStatic ? "static " : ""); Log.LogInfo((object)(text2 + method.ReturnType.Name + " " + method.Name + "(" + text + ")")); } } FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); FieldInfo[] array2 = fields; foreach (FieldInfo field in array2) { if (filters.Any((string filter) => field.Name.IndexOf(filter, StringComparison.OrdinalIgnoreCase) >= 0)) { string text3 = (field.IsStatic ? "static " : ""); Log.LogInfo((object)("FIELD " + text3 + field.FieldType.Name + " " + field.Name)); } } } private void LogPlayerPosition() { //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_0055: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0097: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) Log.LogInfo((object)"========== POSITIONS JOUEUR =========="); if ((Object)(object)Character.localCharacter == (Object)null) { Log.LogWarning((object)"Impossible de lire la position : Character.localCharacter null."); Log.LogInfo((object)"========== FIN POSITIONS JOUEUR =========="); return; } Vector3 position = ((Component)Character.localCharacter).transform.position; Log.LogInfo((object)$"ROOT Character.localCharacter = new Vector3({position.x:0.00}f, {position.y:0.00}f, {position.z:0.00}f);"); if ((Object)(object)Camera.main != (Object)null) { Vector3 position2 = ((Component)Camera.main).transform.position; Log.LogInfo((object)$"CAMERA MAIN = new Vector3({position2.x:0.00}f, {position2.y:0.00}f, {position2.z:0.00}f);"); } else { Log.LogWarning((object)"Camera.main introuvable."); } Rigidbody[] componentsInChildren = ((Component)Character.localCharacter).GetComponentsInChildren(true); Log.LogInfo((object)$"Nombre de Rigidbody enfants trouvés : {componentsInChildren.Length}"); Rigidbody[] array = componentsInChildren; foreach (Rigidbody val in array) { if (!((Object)(object)val == (Object)null)) { Vector3 position3 = ((Component)val).transform.position; Log.LogInfo((object)$"RB '{((Object)val).name}' = new Vector3({position3.x:0.00}f, {position3.y:0.00}f, {position3.z:0.00}f);"); } } Log.LogInfo((object)"========== FIN POSITIONS JOUEUR =========="); } private string GetPath(Transform t) { string text = ((Object)t).name; while ((Object)(object)t.parent != (Object)null) { t = t.parent; text = ((Object)t).name + "/" + text; } return text; } } } namespace System.Diagnostics.CodeAnalysis { [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ConstantExpectedAttribute : Attribute { public object? Min { get; set; } public object? Max { get; set; } } [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ExperimentalAttribute : Attribute { public string DiagnosticId { get; } public string? UrlFormat { get; set; } public ExperimentalAttribute(string diagnosticId) { DiagnosticId = diagnosticId; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] internal sealed class MemberNotNullAttribute : Attribute { public string[] Members { get; } public MemberNotNullAttribute(string member) { Members = new string[1] { member }; } public MemberNotNullAttribute(params string[] members) { Members = members; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] [ExcludeFromCodeCoverage] internal sealed class MemberNotNullWhenAttribute : Attribute { public bool ReturnValue { get; } public string[] Members { get; } public MemberNotNullWhenAttribute(bool returnValue, string member) { ReturnValue = returnValue; Members = new string[1] { member }; } public MemberNotNullWhenAttribute(bool returnValue, params string[] members) { ReturnValue = returnValue; Members = members; } } [AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class SetsRequiredMembersAttribute : Attribute { } [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class StringSyntaxAttribute : Attribute { public const string CompositeFormat = "CompositeFormat"; public const string DateOnlyFormat = "DateOnlyFormat"; public const string DateTimeFormat = "DateTimeFormat"; public const string EnumFormat = "EnumFormat"; public const string GuidFormat = "GuidFormat"; public const string Json = "Json"; public const string NumericFormat = "NumericFormat"; public const string Regex = "Regex"; public const string TimeOnlyFormat = "TimeOnlyFormat"; public const string TimeSpanFormat = "TimeSpanFormat"; public const string Uri = "Uri"; public const string Xml = "Xml"; public string Syntax { get; } public object?[] Arguments { get; } public StringSyntaxAttribute(string syntax) { Syntax = syntax; Arguments = new object[0]; } public StringSyntaxAttribute(string syntax, params object?[] arguments) { Syntax = syntax; Arguments = arguments; } } [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class UnscopedRefAttribute : Attribute { } } namespace System.Runtime.Versioning { [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class RequiresPreviewFeaturesAttribute : Attribute { public string? Message { get; } public string? Url { get; set; } public RequiresPreviewFeaturesAttribute() { } public RequiresPreviewFeaturesAttribute(string? message) { Message = message; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CallerArgumentExpressionAttribute : Attribute { public string ParameterName { get; } public CallerArgumentExpressionAttribute(string parameterName) { ParameterName = parameterName; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CollectionBuilderAttribute : Attribute { public Type BuilderType { get; } public string MethodName { get; } public CollectionBuilderAttribute(Type builderType, string methodName) { BuilderType = builderType; MethodName = methodName; } } [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class CompilerFeatureRequiredAttribute : Attribute { public const string RefStructs = "RefStructs"; public const string RequiredMembers = "RequiredMembers"; public string FeatureName { get; } public bool IsOptional { get; set; } public CompilerFeatureRequiredAttribute(string featureName) { FeatureName = featureName; } } [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class InterpolatedStringHandlerArgumentAttribute : Attribute { public string[] Arguments { get; } public InterpolatedStringHandlerArgumentAttribute(string argument) { Arguments = new string[1] { argument }; } public InterpolatedStringHandlerArgumentAttribute(params string[] arguments) { Arguments = arguments; } } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class InterpolatedStringHandlerAttribute : Attribute { } [EditorBrowsable(EditorBrowsableState.Never)] [ExcludeFromCodeCoverage] internal static class IsExternalInit { } [AttributeUsage(AttributeTargets.Method, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class ModuleInitializerAttribute : Attribute { } [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class OverloadResolutionPriorityAttribute : Attribute { public int Priority { get; } public OverloadResolutionPriorityAttribute(int priority) { Priority = priority; } } [AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)] [ExcludeFromCodeCoverage] internal sealed class ParamCollectionAttribute : Attribute { } [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class RequiredMemberAttribute : Attribute { } [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] [EditorBrowsable(EditorBrowsableState.Never)] [ExcludeFromCodeCoverage] internal sealed class RequiresLocationAttribute : Attribute { } [AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event | AttributeTargets.Interface, Inherited = false)] [ExcludeFromCodeCoverage] internal sealed class SkipLocalsInitAttribute : Attribute { } }