using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using HarmonyLib;
using Il2Cpp;
using Il2CppAssets.Scripts.Actors.Player;
using Il2CppAssets.Scripts.Inventory__Items__Pickups;
using Il2CppAssets.Scripts.Inventory__Items__Pickups.Stats;
using Il2CppAssets.Scripts.Menu.Shop;
using Il2CppAssets.Scripts._Data.Tomes;
using Il2CppSystem.Collections.Generic;
using MelonLoader;
using Microsoft.CodeAnalysis;
using SuperOldMan.MelonLoaderMod;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(Core), "SuperOldMan", "1.0.1", "Slimaeus", null)]
[assembly: MelonGame("Ved", "Megabonk")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("SuperOldMan.MelonLoaderMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.1")]
[assembly: AssemblyInformationalVersion("1.0.0+480015e7b26ed92df2dc71b21233a3e9176431ca")]
[assembly: AssemblyProduct("SuperOldMan.MelonLoaderMod")]
[assembly: AssemblyTitle("SuperOldMan.MelonLoaderMod")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.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.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace SuperOldMan.MelonLoaderMod
{
public class Core : MelonMod
{
[HarmonyPatch(typeof(MyPlayer))]
public static class PlayerPatches
{
[HarmonyPatch("Spawn")]
[HarmonyPostfix]
public static void Spawn_Postfix(MyPlayer __instance)
{
//IL_001a: 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_0028: 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_0041: Expected O, but got Unknown
TomeData val = DataManager.Instance.tomeData[(ETome)14];
List<StatModifier> val2 = new List<StatModifier>();
val2.Add(new StatModifier
{
stat = (EStat)32,
modification = 9f,
modifyType = (EStatModifyType)2
});
__instance.inventory.tomeInventory.AddTome(val, val2, (ERarity)0);
for (int i = 0; i < 98; i++)
{
__instance.inventory.tomeInventory.AddTome(val, new List<StatModifier>(), (ERarity)5);
}
}
}
}
}