Decompiled source of League of Stinkies v1.3.0

plugins/Zhonya's LoL skins mod.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HarmonyLib;
using LeagueofStinkies;
using Microsoft.CodeAnalysis;
using ModelReplacement;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("Zhonya's LoL skins mod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Zhonya's LoL skins mod")]
[assembly: AssemblyTitle("Zhonya's LoL skins mod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
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;
		}
	}
}
namespace ModelReplacement
{
	[BepInPlugin("nya.Zhonya.LeagueofStinkies", "League of Stinkies", "1.3.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		private const string modGUID = "nya.Zhonya.LeagueofStinkies";

		private const string modName = "League of Stinkies";

		private const string modVersion = "1.3.0.0";

		private void Awake()
		{
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Expected O, but got Unknown
			string path = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location));
			Assets.PopulateAssets(path);
			ModelReplacementAPI.RegisterSuitModelReplacement("Streetdemon Brand", typeof(StreetdemonBrandReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Pentakevin", typeof(PentakevinReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Nadalie", typeof(LaIllNidaleeReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Chimidolly", typeof(LaIllNidaleeRubyReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Astrofart", typeof(BardReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Deathsworn Katarina", typeof(DeathSwornKatReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Kai'Sa", typeof(KaiSaReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Kindred", typeof(KindredReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("La Illusion Qiyana", typeof(LIQiyanaReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Oldsuo", typeof(OldsuoReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Soul Fighter Settward", typeof(SettwardReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Furyhorn Veigar", typeof(FuryhornVeigarReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Spirit Blossom Alune", typeof(SBAluneReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Dark Cosmic Jhin", typeof(DCJhinReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Cosmic Surge", typeof(CSJhinReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Yuumi", typeof(YuumiReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Bekko", typeof(CHZedReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Rat", typeof(TeemoReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("ASol", typeof(ASolReplacement));
			ModelReplacementAPI.RegisterSuitModelReplacement("Spirit Blossom Aphelios", typeof(SBAppleReplacement));
			Harmony val = new Harmony("nya.Zhonya.LeagueofStinkies");
			val.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin nya.Zhonya.LeagueofStinkies loaded.");
		}
	}
	public static class Assets
	{
		public static string mainAssetBundleName = "lolstinkies_assetbundle";

		public static AssetBundle mainAssetBundle;

		private static string GetAssemblyName()
		{
			return Assembly.GetExecutingAssembly().FullName.Split(',')[0];
		}

		public static void PopulateAssets(string path)
		{
			if ((Object)(object)mainAssetBundle == (Object)null)
			{
				mainAssetBundle = AssetBundle.LoadFromFile(Path.Combine(path, mainAssetBundleName));
			}
		}
	}
}
namespace LeagueofStinkies
{
	public class StreetdemonBrandReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Brand");
		}
	}
	public class KaiSaReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("KaiSa");
		}
	}
	public class PentakevinReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Pentakevin");
		}
	}
	public class LaIllNidaleeReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("LaIllusion_Nidalee");
		}
	}
	public class LaIllNidaleeRubyReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("LaIll_Nida_Chimi");
		}
	}
	public class BardReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Bard");
		}
	}
	public class DeathSwornKatReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Deathsworn_Katarina");
		}
	}
	public class KindredReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Kindred");
		}
	}
	public class LIQiyanaReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("LaIllusion_Qiyana");
		}
	}
	public class OldsuoReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Oldsuo");
		}
	}
	public class SettwardReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("SoulFighter_Sett");
		}
	}
	public class FuryhornVeigarReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("VeigarFuryhorn");
		}
	}
	public class SBAluneReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Alune_SB_2");
		}
	}
	public class SBAppleReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("SB_Apple");
		}
	}
	public class DCJhinReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("DarkCosmic_Jhin");
		}
	}
	public class CSJhinReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("CosmicSurge_Jhin");
		}
	}
	public class YuumiReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Yuumi");
		}
	}
	public class CHZedReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Zed_smol bestone");
		}
	}
	public class TeemoReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("Teemo");
		}
	}
	public class ASolReplacement : BodyReplacementBase
	{
		protected override GameObject LoadAssetsAndReturnModel()
		{
			return Assets.mainAssetBundle.LoadAsset<GameObject>("AstroSol");
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}