using System;
using System.Collections;
using System.Collections.Generic;
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 BanditSaoriVoiceover.Components;
using BanditSaoriVoiceoverPlugin.Modules;
using BaseVoiceoverLib;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using R2API;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.ContentManagement;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
[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: AssemblyCompany("BanditSaoriVoiceover")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+498ff9b06b80c6d9a741b0d1679b998e5b6a5ca2")]
[assembly: AssemblyProduct("BanditSaoriVoiceover")]
[assembly: AssemblyTitle("BanditSaoriVoiceover")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace BanditSaoriVoiceoverPlugin.Modules
{
public class Content : IContentPackProvider
{
internal ContentPack contentPack = new ContentPack();
public static List<NetworkSoundEventDef> networkSoundEventDefs = new List<NetworkSoundEventDef>();
public string identifier => "com.Schale.BanditSaoriVoiceover";
public void Initialize()
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Expected O, but got Unknown
ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
}
private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider)
{
addContentPackProvider.Invoke((IContentPackProvider)(object)this);
}
public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
{
contentPack.identifier = identifier;
contentPack.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray());
args.ReportProgress(1f);
yield break;
}
public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
{
ContentPack.Copy(contentPack, args.output);
args.ReportProgress(1f);
yield break;
}
public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
{
args.ReportProgress(1f);
yield break;
}
}
public static class Files
{
public static PluginInfo PluginInfo;
internal static string assemblyDir => Path.GetDirectoryName(PluginInfo.Location);
internal static void Init(PluginInfo info)
{
PluginInfo = info;
}
internal static string GetPathToFile(string folderName, string fileName)
{
return Path.Combine(assemblyDir, folderName, fileName);
}
}
public static class SoundBanks
{
private static bool initialized;
public static string SoundBankDirectory => Files.assemblyDir;
public static void Init()
{
if (initialized)
{
return;
}
initialized = true;
using Stream stream = new FileStream(SoundBankDirectory + "\\BanditSaoriSoundbank.bnk", FileMode.Open);
byte[] array = new byte[stream.Length];
stream.Read(array, 0, array.Length);
SoundBanks.Add(array);
}
}
}
namespace BanditSaoriVoiceover
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.Schale.BanditSaoriVoiceover", "BanditSaoriVoiceover", "1.0.2")]
public class BanditSaoriVoiceoverPlugin : BaseUnityPlugin
{
public class NSEInfo
{
public NetworkSoundEventDef nse;
public uint akId = 0u;
public string eventName = string.Empty;
public NSEInfo(NetworkSoundEventDef source)
{
nse = source;
akId = source.akId;
eventName = source.eventName;
}
private void DisableSound()
{
nse.akId = 0u;
nse.eventName = string.Empty;
}
private void EnableSound()
{
nse.akId = akId;
nse.eventName = eventName;
}
public void ValidateParams()
{
if (akId == 0)
{
akId = nse.akId;
}
if (eventName == string.Empty)
{
eventName = nse.eventName;
}
if (!enableVoicelines.Value)
{
DisableSound();
}
else
{
EnableSound();
}
}
}
public static ConfigEntry<KeyboardShortcut> buttonVanitas;
public static ConfigEntry<KeyboardShortcut> buttonVanitasFull;
public static ConfigEntry<KeyboardShortcut> buttonMuda;
public static ConfigEntry<KeyboardShortcut> buttonHurt;
public static ConfigEntry<KeyboardShortcut> buttonOmoshiroi;
public static ConfigEntry<KeyboardShortcut> buttonMunashii;
public static ConfigEntry<KeyboardShortcut> buttonThanks;
public static ConfigEntry<KeyboardShortcut> buttonTitle;
public static ConfigEntry<KeyboardShortcut> buttonIntro;
public static ConfigEntry<KeyboardShortcut> buttonFormation;
public static ConfigEntry<KeyboardShortcut> buttonCafe5;
public static ConfigEntry<KeyboardShortcut> buttonExLevel1;
public static ConfigEntry<KeyboardShortcut> buttonExLevel2;
public static ConfigEntry<KeyboardShortcut> buttonExLevel3;
public static ConfigEntry<bool> enableVoicelines;
public static bool playedSeasonalVoiceline = false;
public static AssetBundle assetBundle;
public static SurvivorDef survivorDef = Addressables.LoadAssetAsync<SurvivorDef>((object)"RoR2/Base/Bandit2/Bandit2.asset").WaitForCompletion();
public static List<NSEInfo> nseList = new List<NSEInfo>();
public void Awake()
{
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Expected O, but got Unknown
//IL_0099: Expected O, but got Unknown
//IL_00c5: 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_00d5: Expected O, but got Unknown
//IL_00ea: 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)
//IL_00fa: Expected O, but got Unknown
//IL_010f: Unknown result type (might be due to invalid IL or missing references)
//IL_0114: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Expected O, but got Unknown
//IL_0134: 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_0144: Expected O, but got Unknown
//IL_0159: 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_0169: Expected O, but got Unknown
//IL_017e: Unknown result type (might be due to invalid IL or missing references)
//IL_0183: Unknown result type (might be due to invalid IL or missing references)
//IL_018e: Expected O, but got Unknown
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Expected O, but got Unknown
//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
//IL_01d8: Expected O, but got Unknown
//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
//IL_01fd: Expected O, but got Unknown
//IL_0212: Unknown result type (might be due to invalid IL or missing references)
//IL_0217: Unknown result type (might be due to invalid IL or missing references)
//IL_0222: Expected O, but got Unknown
//IL_0237: Unknown result type (might be due to invalid IL or missing references)
//IL_023c: Unknown result type (might be due to invalid IL or missing references)
//IL_0247: Expected O, but got Unknown
//IL_025c: Unknown result type (might be due to invalid IL or missing references)
//IL_0261: Unknown result type (might be due to invalid IL or missing references)
//IL_026c: Expected O, but got Unknown
//IL_0281: Unknown result type (might be due to invalid IL or missing references)
//IL_0286: Unknown result type (might be due to invalid IL or missing references)
//IL_0291: Expected O, but got Unknown
//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
//IL_02b6: Expected O, but got Unknown
Files.PluginInfo = ((BaseUnityPlugin)this).Info;
RoR2Application.onLoad = (Action)Delegate.Combine(RoR2Application.onLoad, new Action(OnLoad));
new Content().Initialize();
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("BanditSaoriVoiceover.banditsaorivoiceoverbundle"))
{
assetBundle = AssetBundle.LoadFromStream(stream);
}
SoundBanks.Init();
InitNSE();
enableVoicelines = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Settings", "Enable Voicelines"), true, new ConfigDescription("Enable voicelines when using the BanditSaori Skin.", (AcceptableValueBase)null, Array.Empty<object>()));
enableVoicelines.SettingChanged += EnableVoicelines_SettingChanged;
buttonVanitas = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Vanitas Vanitatum"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonVanitasFull = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Vanitas Vanitatum, et Omnia Vanitas"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonMuda = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Muda da"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonOmoshiroi = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Omoshiroi"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonHurt = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Hurt"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonMunashii = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Munashii"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonThanks = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Thanks"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonTitle = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Blue Archive"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonIntro = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Introduction"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonFormation = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Formation Select"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonCafe5 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "Naruhodo"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonExLevel1 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX 1"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonExLevel2 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX 2"), KeyboardShortcut.Empty, (ConfigDescription)null);
buttonExLevel3 = ((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>(new ConfigDefinition("Keybinds", "EX 3"), KeyboardShortcut.Empty, (ConfigDescription)null);
if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"))
{
RiskOfOptionsCompat();
}
}
private void EnableVoicelines_SettingChanged(object sender, EventArgs e)
{
RefreshNSE();
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
private void RiskOfOptionsCompat()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Expected O, but got Unknown
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Expected O, but got Unknown
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Expected O, but got Unknown
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0040: Expected O, but got Unknown
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_0050: Expected O, but got Unknown
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0060: Expected O, but got Unknown
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Expected O, but got Unknown
//IL_0076: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Expected O, but got Unknown
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Expected O, but got Unknown
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_00a0: Expected O, but got Unknown
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Expected O, but got Unknown
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_00c0: Expected O, but got Unknown
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Expected O, but got Unknown
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: Expected O, but got Unknown
//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
//IL_00f0: Expected O, but got Unknown
ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(enableVoicelines));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonTitle));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonIntro));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonFormation));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonVanitas));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonVanitasFull));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonMunashii));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonExLevel1));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonExLevel2));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonExLevel3));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonCafe5));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonMuda));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonOmoshiroi));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonThanks));
ModSettingsManager.AddOption((BaseOption)new KeyBindOption(buttonHurt));
ModSettingsManager.SetModIcon(assetBundle.LoadAsset<Sprite>("texIconSaori"));
}
private void OnLoad()
{
//IL_0008: 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_007e: Expected O, but got Unknown
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Expected O, but got Unknown
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Expected O, but got Unknown
SkinDef val = null;
SkinDef[] array = SkinCatalog.FindSkinsForBody(BodyCatalog.FindBodyIndex("Bandit2Body"));
SkinDef[] array2 = array;
foreach (SkinDef val2 in array2)
{
if (((Object)val2).name == "SaoriSkin")
{
val = val2;
break;
}
}
if (!Object.op_Implicit((Object)(object)val))
{
Debug.LogError((object)"BanditSaoriVoiceover: Bandit Saori SkinDef not found. Voicelines will not work!");
}
else
{
VoiceoverInfo val3 = new VoiceoverInfo(typeof(BanditSaoriVoiceoverComponent), val, "Bandit2Body");
val3.selectActions = (LobbySelectActions)Delegate.Combine((Delegate?)(object)val3.selectActions, (Delegate?)new LobbySelectActions(SaoriSelect));
}
RefreshNSE();
}
private void SaoriSelect(GameObject mannequinObject)
{
if (!enableVoicelines.Value)
{
return;
}
bool flag = false;
if (!playedSeasonalVoiceline)
{
if (DateTime.Today.Month == 1 && DateTime.Today.Day == 1)
{
Util.PlaySound("Play_BanditSaori_Lobby_Newyear", mannequinObject);
flag = true;
}
else if (DateTime.Today.Month == 9 && DateTime.Today.Day == 3)
{
Util.PlaySound("Play_BanditSaori_Lobby_bday", mannequinObject);
flag = true;
}
else if (DateTime.Today.Month == 10 && DateTime.Today.Day == 31)
{
Util.PlaySound("Play_BanditSaori_Lobby_Halloween", mannequinObject);
flag = true;
}
else if (DateTime.Today.Month == 12 && DateTime.Today.Day == 25)
{
Util.PlaySound("Play_BanditSaori_Lobby_xmas", mannequinObject);
flag = true;
}
if (flag)
{
playedSeasonalVoiceline = true;
}
}
if (!flag)
{
if (Util.CheckRoll(5f, 0f, (CharacterMaster)null))
{
Util.PlaySound("Play_BanditSaori_TitleDrop", mannequinObject);
}
else
{
Util.PlaySound("Play_BanditSaori_Lobby", mannequinObject);
}
}
}
private void InitNSE()
{
BanditSaoriVoiceoverComponent.nseShout = RegisterNSE("Play_BanditSaori_Shout");
BanditSaoriVoiceoverComponent.nseStealth = RegisterNSE("Play_BanditSaori_Stealth");
BanditSaoriVoiceoverComponent.nseBlock = RegisterNSE("Play_BanditSaori_Block");
BanditSaoriVoiceoverComponent.nseEx = RegisterNSE("Play_BanditSaori_Ex");
BanditSaoriVoiceoverComponent.nseExLevel = RegisterNSE("Play_BanditSaori_ExLevel");
BanditSaoriVoiceoverComponent.nseVanitas = RegisterNSE("Play_BanditSaori_Vanitas");
BanditSaoriVoiceoverComponent.nseVanitasFull = RegisterNSE("Play_BanditSaori_VanitasFull");
BanditSaoriVoiceoverComponent.nseMuda = RegisterNSE("Play_BanditSaori_Muda");
BanditSaoriVoiceoverComponent.nseHurt = RegisterNSE("Play_BanditSaori_TakeDamage");
BanditSaoriVoiceoverComponent.nseOmoshiroi = RegisterNSE("Play_BanditSaori_Omoshiroi");
BanditSaoriVoiceoverComponent.nseMunashii = RegisterNSE("Play_BanditSaori_Munashii");
BanditSaoriVoiceoverComponent.nseThanks = RegisterNSE("Play_BanditSaori_Thanks");
BanditSaoriVoiceoverComponent.nseTitle = RegisterNSE("Play_BanditSaori_TitleDrop");
BanditSaoriVoiceoverComponent.nseIntro = RegisterNSE("Play_BanditSaori_Intro");
BanditSaoriVoiceoverComponent.nseFormation = RegisterNSE("Play_BanditSaori_Formation_Select");
BanditSaoriVoiceoverComponent.nseCafe5 = RegisterNSE("Play_BanditSaori_Cafe5");
BanditSaoriVoiceoverComponent.nseExLevel1 = RegisterNSE("Play_BanditSaori_ExLevel1");
BanditSaoriVoiceoverComponent.nseExLevel2 = RegisterNSE("Play_BanditSaori_ExLevel2");
BanditSaoriVoiceoverComponent.nseExLevel3 = RegisterNSE("Play_BanditSaori_ExLevel3");
}
private NetworkSoundEventDef RegisterNSE(string eventName)
{
NetworkSoundEventDef val = ScriptableObject.CreateInstance<NetworkSoundEventDef>();
val.eventName = eventName;
Content.networkSoundEventDefs.Add(val);
nseList.Add(new NSEInfo(val));
return val;
}
public void RefreshNSE()
{
foreach (NSEInfo nse in nseList)
{
nse.ValidateParams();
}
}
}
}
namespace BanditSaoriVoiceover.Components
{
public class BanditSaoriVoiceoverComponent : BaseVoiceoverComponent
{
public static NetworkSoundEventDef nseShout;
public static NetworkSoundEventDef nseStealth;
public static NetworkSoundEventDef nseBlock;
public static NetworkSoundEventDef nseExLevel;
public static NetworkSoundEventDef nseEx;
public static NetworkSoundEventDef nseVanitas;
public static NetworkSoundEventDef nseVanitasFull;
public static NetworkSoundEventDef nseMuda;
public static NetworkSoundEventDef nseHurt;
public static NetworkSoundEventDef nseOmoshiroi;
public static NetworkSoundEventDef nseMunashii;
public static NetworkSoundEventDef nseThanks;
public static NetworkSoundEventDef nseTitle;
public static NetworkSoundEventDef nseIntro;
public static NetworkSoundEventDef nseFormation;
public static NetworkSoundEventDef nseCafe5;
public static NetworkSoundEventDef nseExLevel1;
public static NetworkSoundEventDef nseExLevel2;
public static NetworkSoundEventDef nseExLevel3;
private float levelCooldown = 0f;
private float blockedCooldown = 0f;
private float lowHealthCooldown = 0f;
private float specialCooldown = 0f;
private float shrineFailCooldown = 0f;
private bool acquiredScepter = false;
protected override void Start()
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
((BaseVoiceoverComponent)this).Start();
if (Object.op_Implicit((Object)(object)base.inventory) && base.inventory.GetItemCount(BaseVoiceoverComponent.scepterIndex) > 0)
{
acquiredScepter = true;
}
}
protected override void FixedUpdate()
{
((BaseVoiceoverComponent)this).FixedUpdate();
if (specialCooldown > 0f)
{
specialCooldown -= Time.fixedDeltaTime;
}
if (levelCooldown > 0f)
{
levelCooldown -= Time.fixedDeltaTime;
}
if (blockedCooldown > 0f)
{
blockedCooldown -= Time.fixedDeltaTime;
}
if (lowHealthCooldown > 0f)
{
lowHealthCooldown -= Time.fixedDeltaTime;
}
if (shrineFailCooldown > 0f)
{
shrineFailCooldown -= Time.fixedDeltaTime;
}
}
public override void PlayDamageBlockedServer()
{
if (NetworkServer.active && !(blockedCooldown > 0f) && ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseBlock, 0.55f, false))
{
blockedCooldown = 30f;
}
}
public override void PlayDeath()
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Defeat", 4f, true);
}
public override void PlayHurt(float percentHPLost)
{
if (percentHPLost >= 0.1f)
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_TakeDamage", 0f, false);
}
}
public override void PlayLevelUp()
{
if (!(levelCooldown > 0f) && ((!Util.CheckRoll(50f, 0f, (CharacterMaster)null)) ? ((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_LevelUp_Long", 6.6f, false) : ((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_LevelUp_Short", 1.35f, false)))
{
levelCooldown = 60f;
}
}
public override void PlayLowHealth()
{
if (!(lowHealthCooldown > 0f) && (Util.CheckRoll(60f, 0f, (CharacterMaster)null) ? ((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_LowHealth", 0f, false) : (Util.CheckRoll(90f, 0f, (CharacterMaster)null) ? ((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Lobby5", 3.8f, false) : ((!Util.CheckRoll(50f, 0f, (CharacterMaster)null)) ? ((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Memorial4", 12.8f, false) : ((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Memorial2", 7.35f, false)))))
{
lowHealthCooldown = 60f;
}
}
public override void PlaySecondaryAuthority(GenericSkill skill)
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseShout, 0f, false);
}
public override void PlaySpawn()
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Spawn", 2.4f, true);
}
public override void PlaySpecialAuthority(GenericSkill skill)
{
if (!(specialCooldown > 0f) && ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLevel, 1.9f, false))
{
specialCooldown = 10f;
}
}
public override void PlayTeleporterFinish()
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Victory", 2.7f, false);
}
public override void PlayTeleporterStart()
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Ex", 4.4f, true);
}
public override void PlayVictory()
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Lobby3", 4.7f, true);
}
protected override void Inventory_onItemAddedClient(ItemIndex itemIndex)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Invalid comparison between Unknown and I4
//IL_0011: 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_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Invalid comparison between Unknown and I4
((BaseVoiceoverComponent)this).Inventory_onItemAddedClient(itemIndex);
if ((int)BaseVoiceoverComponent.scepterIndex != -1 && itemIndex == BaseVoiceoverComponent.scepterIndex)
{
PlayAcquireScepter();
return;
}
ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex);
if ((Object)(object)itemDef == (Object)(object)Items.Squid || (Object)(object)itemDef == (Object)(object)Items.Plant || (Object)(object)itemDef == (Object)(object)Items.SlowOnHit)
{
PlayBadItem();
}
else if (Object.op_Implicit((Object)(object)itemDef) && (int)itemDef.deprecatedTier == 2)
{
PlayAcquireLegendary();
}
}
public void PlayAcquireScepter()
{
if (!acquiredScepter)
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_AcquireScepter", 22.75f, true);
acquiredScepter = true;
}
}
public void PlayBadItem()
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Cafe3", 0.75f, false);
}
public void PlayAcquireLegendary()
{
if (Util.CheckRoll(75f, 0f, (CharacterMaster)null))
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Relationship", 3.7f, false);
}
else
{
((BaseVoiceoverComponent)this).TryPlaySound("Play_BanditSaori_Relationship_Long", 12.25f, false);
}
}
public override void PlayShrineOfChanceFailServer()
{
if (!(shrineFailCooldown > 0f) && Util.CheckRoll(15f, 0f, (CharacterMaster)null) && ((!Util.CheckRoll(50f, 0f, (CharacterMaster)null)) ? ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseVanitasFull, 2.9f, false) : ((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseVanitas, 1.2f, false)))
{
shrineFailCooldown = 60f;
}
}
protected override void CheckInputs()
{
if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonVanitas))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseVanitas, 1.2f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonVanitasFull))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseVanitasFull, 2.9f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonHurt))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseHurt, 0.1f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonMuda))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseMuda, 0.6f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonOmoshiroi))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseOmoshiroi, 0.75f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonMunashii))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseMunashii, 4.5f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonThanks))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseThanks, 1.5f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonTitle))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseTitle, 1f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonIntro))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseIntro, 12.3f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonFormation))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseFormation, 1f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonCafe5))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseCafe5, 3.55f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonExLevel1))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLevel1, 1.85f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonExLevel2))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLevel2, 0.1f, false);
}
else if (Utils.GetKeyPressed(BanditSaoriVoiceoverPlugin.buttonExLevel3))
{
((BaseVoiceoverComponent)this).TryPlayNetworkSound(nseExLevel3, 1.45f, false);
}
}
public override bool ComponentEnableVoicelines()
{
return BanditSaoriVoiceoverPlugin.enableVoicelines.Value;
}
}
}