using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using Dissonance;
using GameNetcodeStuff;
using HarmonyLib;
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("LethalStarRail")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("LethalStarRail")]
[assembly: AssemblyTitle("LethalStarRail")]
[assembly: NeutralResourcesLanguage("ja-JP")]
[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 LethalStarRail
{
public class MSSTELLE : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Stelle";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRCAELUS : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Caelus";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSMARCH_PRESERVATION : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "March7th-Default";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRDANHENG : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "DanHeng";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRWELT : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Welt";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSHIMEKO : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Himeko";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSCLARA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Clara";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSBRONYA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Bronya";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSSEELE : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Seele";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSASTA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Asta";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRARLAN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Arlan";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSBAILU : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Bailu";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRGEPARD : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Gepard";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSHERTA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Herta";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSHOOK : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Hook";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRJINGYUAN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "JingYuan";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSNATASHA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Natasha";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSPELA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Pela";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRSAMPO : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Sampo";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSSUSHANG : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Sushang";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSTINGYUN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Tingyun";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSQINGQUE : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Qingque";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSSERVAL : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Serval";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRYANQING : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Yanqing";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRBLADE : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Blade";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class POMPOM : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Pompom";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRDANHENGIL : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "DanHeng-IL";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSFUXUAN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Fuxuan";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSGUINAIFEN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Guinaifen";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSJINGLIU : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Jingliu";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSKAFKA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Kafka";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRLUKA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Luka";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MRLUOCHA : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Luocha";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSLYNX : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Lynx";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSSILVERWOLF : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Silverwolf";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSYUKONG : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Yukong";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class MSTOPAZ : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "Topaz";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
protected override void AddModelScripts()
{
GameObject gameObject = ((Component)base.replacementModel.GetComponentInChildren<SkinnedMeshRenderer>()).gameObject;
BlendShapeSync blendShapeSync = gameObject.AddComponent(typeof(BlendShapeSync)) as BlendShapeSync;
blendShapeSync.SetMouthBlendShapeIndex("あ");
blendShapeSync.SetEyesBlendShapeIndex("まばたき");
blendShapeSync.player = ((BodyReplacementBase)this).controller;
blendShapeSync.init();
}
}
public class BlendShapeSync : MonoBehaviour
{
public PlayerControllerB player;
public float defaultBlendValue = 0f;
public float maxBlendValue = 50f;
private int time = 500;
private int interval = 0;
private int eyeStartClose = 0;
private int eyeEndClose = 10;
private bool isLoopEnable = false;
private bool isRandomEnable = true;
protected int mouthIndex;
protected int eyesIndex;
protected VoicePlayerState voice;
public float sensitivity => Plugin.voiceSensitivity.Value;
public int SetMouthBlendShapeIndex(string mouthName)
{
mouthIndex = ((Component)this).gameObject.GetComponentInChildren<SkinnedMeshRenderer>().sharedMesh.GetBlendShapeIndex(mouthName);
return mouthIndex;
}
public int SetEyesBlendShapeIndex(string eyesName)
{
eyesIndex = ((Component)this).gameObject.GetComponentInChildren<SkinnedMeshRenderer>().sharedMesh.GetBlendShapeIndex(eyesName);
return eyesIndex;
}
private void Update()
{
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected O, but got Unknown
if ((Object)StartOfRound.Instance.voiceChatModule == (Object)null)
{
return;
}
if (voice == null)
{
init();
return;
}
float num = Mathf.Clamp(Map(voice.Amplitude * sensitivity, 0f, 1f, defaultBlendValue, maxBlendValue), defaultBlendValue, maxBlendValue);
float num2 = ((voice.IsSpeaking && !player.isPlayerDead) ? num : defaultBlendValue);
if (mouthIndex != -1)
{
((Component)this).gameObject.GetComponentInChildren<SkinnedMeshRenderer>().SetBlendShapeWeight(mouthIndex, num2);
}
interval++;
((Component)this).gameObject.GetComponentInChildren<SkinnedMeshRenderer>().SetBlendShapeWeight(eyesIndex, defaultBlendValue);
if (isRandomEnable)
{
int num3 = Random.Range(1, 500);
if (num3 == interval)
{
isLoopEnable = true;
isRandomEnable = false;
}
}
if (isLoopEnable)
{
eyeStartClose++;
if (eyeStartClose < eyeEndClose)
{
((Component)this).gameObject.GetComponentInChildren<SkinnedMeshRenderer>().SetBlendShapeWeight(eyesIndex, 100f);
}
else
{
eyeStartClose = 0;
isRandomEnable = true;
isLoopEnable = false;
}
}
if (interval >= time)
{
interval = 0;
}
}
public void init()
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Expected O, but got Unknown
//IL_0044: Expected O, but got Unknown
StartOfRound.Instance.RefreshPlayerVoicePlaybackObjects();
voice = player.voicePlayerState;
if (voice == null && (Object)player == (Object)StartOfRound.Instance.localPlayerController)
{
voice = StartOfRound.Instance.voiceChatModule.FindPlayer(StartOfRound.Instance.voiceChatModule.LocalPlayerName);
}
}
private float Map(float value, float min1, float max1, float min2, float max2)
{
float num = (value - min1) / (max1 - min1);
return num * (max2 - min2) + min2;
}
}
[BepInPlugin("com.zephy.lethal_starrail", "Lethal Company x Honkai Star Rail", "0.1.1")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
public static ConfigFile config;
public static ConfigEntry<float> voiceSensitivity { get; private set; }
private static void InitConfig()
{
voiceSensitivity = config.Bind<float>("Voice sensitivity for mouth movement", "Sensitivity Value", 10f, "Number from 5 to 20");
}
private void Awake()
{
//IL_0326: Unknown result type (might be due to invalid IL or missing references)
//IL_032c: Expected O, but got Unknown
config = ((BaseUnityPlugin)this).Config;
InitConfig();
Assets.PopulateAssets();
ModelReplacementAPI.RegisterSuitModelReplacement("Stelle", typeof(MSSTELLE));
ModelReplacementAPI.RegisterSuitModelReplacement("Caelus", typeof(MRCAELUS));
ModelReplacementAPI.RegisterSuitModelReplacement("March7th-Default", typeof(MSMARCH_PRESERVATION));
ModelReplacementAPI.RegisterSuitModelReplacement("DanHeng", typeof(MRDANHENG));
ModelReplacementAPI.RegisterSuitModelReplacement("Welt", typeof(MRWELT));
ModelReplacementAPI.RegisterSuitModelReplacement("Himeko", typeof(MSHIMEKO));
ModelReplacementAPI.RegisterSuitModelReplacement("Clara", typeof(MSCLARA));
ModelReplacementAPI.RegisterSuitModelReplacement("Bronya", typeof(MSBRONYA));
ModelReplacementAPI.RegisterSuitModelReplacement("Seele", typeof(MSSEELE));
ModelReplacementAPI.RegisterSuitModelReplacement("Asta", typeof(MSASTA));
ModelReplacementAPI.RegisterSuitModelReplacement("Arlan", typeof(MRARLAN));
ModelReplacementAPI.RegisterSuitModelReplacement("Bailu", typeof(MSBAILU));
ModelReplacementAPI.RegisterSuitModelReplacement("Gepard", typeof(MRGEPARD));
ModelReplacementAPI.RegisterSuitModelReplacement("Herta", typeof(MSHERTA));
ModelReplacementAPI.RegisterSuitModelReplacement("Hook", typeof(MSHOOK));
ModelReplacementAPI.RegisterSuitModelReplacement("JingYuan", typeof(MRJINGYUAN));
ModelReplacementAPI.RegisterSuitModelReplacement("Natasha", typeof(MSNATASHA));
ModelReplacementAPI.RegisterSuitModelReplacement("Pela", typeof(MSPELA));
ModelReplacementAPI.RegisterSuitModelReplacement("Sampo", typeof(MRSAMPO));
ModelReplacementAPI.RegisterSuitModelReplacement("Sushang", typeof(MSSUSHANG));
ModelReplacementAPI.RegisterSuitModelReplacement("Tingyun", typeof(MSTINGYUN));
ModelReplacementAPI.RegisterSuitModelReplacement("Qingque", typeof(MSQINGQUE));
ModelReplacementAPI.RegisterSuitModelReplacement("Serval", typeof(MSSERVAL));
ModelReplacementAPI.RegisterSuitModelReplacement("Yanqing", typeof(MRYANQING));
ModelReplacementAPI.RegisterSuitModelReplacement("Pompom", typeof(POMPOM));
ModelReplacementAPI.RegisterSuitModelReplacement("Blade", typeof(MRBLADE));
ModelReplacementAPI.RegisterSuitModelReplacement("DanHeng-IL", typeof(MRDANHENGIL));
ModelReplacementAPI.RegisterSuitModelReplacement("Fuxuan", typeof(MSFUXUAN));
ModelReplacementAPI.RegisterSuitModelReplacement("Guinaifen", typeof(MSGUINAIFEN));
ModelReplacementAPI.RegisterSuitModelReplacement("Jingliu", typeof(MSJINGLIU));
ModelReplacementAPI.RegisterSuitModelReplacement("Kafka", typeof(MSKAFKA));
ModelReplacementAPI.RegisterSuitModelReplacement("Luka", typeof(MRLUKA));
ModelReplacementAPI.RegisterSuitModelReplacement("Luocha", typeof(MRLUOCHA));
ModelReplacementAPI.RegisterSuitModelReplacement("Lynx", typeof(MSLYNX));
ModelReplacementAPI.RegisterSuitModelReplacement("Silverwolf", typeof(MSSILVERWOLF));
ModelReplacementAPI.RegisterSuitModelReplacement("Yukong", typeof(MSYUKONG));
ModelReplacementAPI.RegisterSuitModelReplacement("Topaz", typeof(MSTOPAZ));
Harmony val = new Harmony("com.zephy.lethal_starrail");
val.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin com.zephy.lethal_starrail is loaded!");
}
}
public static class Assets
{
public static string mainAssetBundleName = "LethalStarRail";
public static AssetBundle MainAssetBundle = null;
private static string GetAssemblyName()
{
return Assembly.GetExecutingAssembly().GetName().Name.Replace(" ", "_");
}
public static void PopulateAssets()
{
if ((Object)(object)MainAssetBundle == (Object)null)
{
Console.WriteLine(GetAssemblyName() + "." + mainAssetBundleName);
using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetAssemblyName() + "." + mainAssetBundleName);
MainAssetBundle = AssetBundle.LoadFromStream(stream);
}
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}