using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")] [assembly: AssemblyCompany("DrownDeath_StamExh")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("0.0.1.0")] [assembly: AssemblyInformationalVersion("0.0.1")] [assembly: AssemblyProduct("DrownDeath_StamExh")] [assembly: AssemblyTitle("DrownDeath_StamExh")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.1.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace 溺水无体力死亡 { [BepInPlugin("com.HsgtLgt.DrownDeath_StamExh", "HsgtLgt_DrownDeath_StamExh", "0.0.1")] public class DrownDeath_StamExh : BaseUnityPlugin { public const string modGuid = "com.HsgtLgt.DrownDeath_StamExh"; public const string modName = "HsgtLgt_DrownDeath_StamExh"; public const string modVersion = "0.0.1"; private void Awake() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) new Harmony("com.HsgtLgt.DrownDeath_StamExh").PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"HsgtLgt_DrownDeath_StamExh v0.0.1 已加载!"); } } [HarmonyPatch(typeof(Player), "OnSwimming")] public static class Player_OnSwimming_Patch { private static void Prefix(Player __instance, Vector3 targetVel, float dt) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown //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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) if (((Character)__instance).IsSwimming() && !((Character)__instance).IsOnGround() && !((Character)__instance).HaveStamina(0f)) { HitData val = new HitData(); val.m_damage.m_damage = ((Character)__instance).GetMaxHealth() * 100f; val.m_point = ((Character)__instance).GetCenterPoint(); val.m_dir = Vector3.down; val.m_pushForce = 10f; val.m_hitType = (HitType)4; ((Character)__instance).Damage(val); } } } }