Decompiled source of RenegadeVikings v1.3.8
RenegadeVikings.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using JetBrains.Annotations; using LocalizationManager; using Microsoft.CodeAnalysis; using RenegadeVikings.Functions; using RenegadeVikings.Utilities; using RenegadeVikings.VikingsData; using RenegadeVikings.VikingsData.Neutral; using RenegadeVikings.VikingsData.Overlord; using RenegadeVikings.VikingsData.Renegade; using ServerSync; using Splatform; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Core.ObjectPool; using YamlDotNet.Core.Tokens; using YamlDotNet.Helpers; using YamlDotNet.Serialization; using YamlDotNet.Serialization.BufferedDeserialization; using YamlDotNet.Serialization.BufferedDeserialization.TypeDiscriminators; using YamlDotNet.Serialization.Callbacks; using YamlDotNet.Serialization.Converters; using YamlDotNet.Serialization.EventEmitters; using YamlDotNet.Serialization.NamingConventions; using YamlDotNet.Serialization.NodeDeserializers; using YamlDotNet.Serialization.NodeTypeResolvers; using YamlDotNet.Serialization.ObjectFactories; using YamlDotNet.Serialization.ObjectGraphTraversalStrategies; using YamlDotNet.Serialization.ObjectGraphVisitors; using YamlDotNet.Serialization.Schemas; using YamlDotNet.Serialization.TypeInspectors; using YamlDotNet.Serialization.TypeResolvers; using YamlDotNet.Serialization.Utilities; using YamlDotNet.Serialization.ValueDeserializers; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("blacks7ar")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.3.8")] [assembly: AssemblyInformationalVersion("1.3.8")] [assembly: AssemblyProduct("RenegadeVikings")] [assembly: AssemblyTitle("RenegadeVikings")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.3.8.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 RenegadeVikings { [BepInPlugin("blacks7ar.RenegadeVikings", "RenegadeVikings", "1.3.8")] public class Plugin : BaseUnityPlugin { private const string modGUID = "blacks7ar.RenegadeVikings"; public const string modName = "RenegadeVikings"; public const string modAuthor = "blacks7ar"; public const string modVersion = "1.3.8"; public const string modLink = "https://valheim.thunderstore.io/package/blacks7ar/RenegadeVikings/"; private static string traderYml = "blacks7ar.RenegadeVikings.yml"; private static readonly string configPath = Paths.ConfigPath; private static string ymlFullPath = Paths.ConfigPath + Path.DirectorySeparatorChar + traderYml; public static readonly ManualLogSource RVLogger = Logger.CreateLogSource("RenegadeVikings"); private static readonly Harmony _harmony = new Harmony("blacks7ar.RenegadeVikings"); private static readonly ConfigSync _configSync = new ConfigSync("blacks7ar.RenegadeVikings") { DisplayName = "RenegadeVikings", CurrentVersion = "1.3.8", MinimumRequiredVersion = "1.3.8" }; private static ConfigEntry<Toggle> _serverConfigLocked; public static readonly CustomSyncedValue<List<TraderYaml>> _TraderYml = new CustomSyncedValue<List<TraderYaml>>(_configSync, "Trader Items", new List<TraderYaml>()); private static ConfigEntry<string> _vikingsFood; public static GameObject _PrefabContainer; public static readonly List<Character> _companionList = new List<Character>(); public static AssetBundle _renegadeBundle; public static GameObject _warHorn; public static GameObject _healingPill; public static GameObject _summonBatsSpawn; public static GameObject _summonSkeletonSpawn; public static GameObject _attackSummonSkeleton; public static GameObject _attackSummonBats; public static GameObject _summonedSkeleton; public static GameObject _summonedBats; public static GameObject _attackClusterBomb; public static Plugin _instance; public static HashSet<string> VikingsFood; public static Localization english; public static List<TraderYaml> _traderItem { get; private set; } public ConfigEntry<T> config<T>(string group, string name, T value, ConfigDescription description, bool synchronizedConfig = true) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown ConfigDescription val = new ConfigDescription(description.Description + (synchronizedConfig ? " [Synced with Server]" : " [Not Synced with Server]"), description.AcceptableValues, description.Tags); ConfigEntry<T> val2 = ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, val); _configSync.AddConfigEntry<T>(val2).SynchronizedConfig = synchronizedConfig; return val2; } public ConfigEntry<T> config2<T>(string group, string name, T value, string desc, bool synchronizedConfig = true) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown RenegadeVikings.Utilities.ConfigurationManagerAttributes configurationManagerAttributes = new RenegadeVikings.Utilities.ConfigurationManagerAttributes { CustomDrawer = TextBox }; return config(group, name, value, new ConfigDescription(desc, (AcceptableValueBase)null, new object[1] { configurationManagerAttributes }), synchronizedConfig); } private void ConfigWatcher() { FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(configPath, traderYml); fileSystemWatcher.Changed += ReadTraderYaml; fileSystemWatcher.Created += ReadTraderYaml; fileSystemWatcher.Renamed += ReadTraderYaml; fileSystemWatcher.IncludeSubdirectories = true; fileSystemWatcher.SynchronizingObject = ThreadingHelper.SynchronizingObject; fileSystemWatcher.EnableRaisingEvents = true; } private void ReadTraderYaml(object sender, FileSystemEventArgs e) { try { StreamReader streamReader = File.OpenText(ymlFullPath); _traderItem = Helper.ReadSerializedYml(streamReader.ReadToEnd()); streamReader.Close(); _TraderYml.AssignLocalValue(_traderItem); } catch { Logging.LogError("There was an issue loading you " + traderYml); Logging.LogError("Please check your entries for spelling and format!"); } } public void Awake() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Expected O, but got Unknown //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Expected O, but got Unknown //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Expected O, but got Unknown //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Expected O, but got Unknown //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Expected O, but got Unknown //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Expected O, but got Unknown //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Expected O, but got Unknown //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Expected O, but got Unknown //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Expected O, but got Unknown //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Expected O, but got Unknown //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Expected O, but got Unknown //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Expected O, but got Unknown //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04ef: Expected O, but got Unknown //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Expected O, but got Unknown //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Expected O, but got Unknown //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Expected O, but got Unknown //IL_05dd: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Expected O, but got Unknown //IL_0616: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Expected O, but got Unknown //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Expected O, but got Unknown //IL_069c: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Expected O, but got Unknown ((BaseUnityPlugin)this).Config.SaveOnConfigSet = false; _instance = this; Localizer.Load(); english = new Localization(); english.SetupLanguage("English"); _renegadeBundle = GetAssetBundleFromResources("renegadebundle"); _warHorn = _renegadeBundle.LoadAsset<GameObject>("BRV_WarHorn"); SE_SummonCompanion sE_SummonCompanion = ScriptableObject.CreateInstance<SE_SummonCompanion>(); ((StatusEffect)sE_SummonCompanion).m_ttl = 0.25f; _warHorn.GetComponent<ItemDrop>().m_itemData.m_shared.m_consumeStatusEffect = (StatusEffect)(object)sE_SummonCompanion; _healingPill = _renegadeBundle.LoadAsset<GameObject>("BRV_HealingPill"); _summonBatsSpawn = _renegadeBundle.LoadAsset<GameObject>("brv_summon_bats_spawn"); _summonSkeletonSpawn = _renegadeBundle.LoadAsset<GameObject>("brv_summon_skeleton_spawn"); _serverConfigLocked = config("1- ServerSync", "Lock Configuration", Toggle.On, new ConfigDescription("If On, the configuration is locked and can be changed by server admins only.", (AcceptableValueBase)null, Array.Empty<object>())); _configSync.AddLockingConfigEntry<Toggle>(_serverConfigLocked); ConfigData._neutralHealth = config("2- Neutral Vikings", "Health", 300f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 500f), Array.Empty<object>())); ConfigData._neutralDmgLevel = config("2- Neutral Vikings", "Damage Level", 2, new ConfigDescription("Determines weapons quality level.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), new object[1] { new RenegadeVikings.Utilities.ConfigurationManagerAttributes { ShowRangeAsPercent = false } })); ConfigData._neutralArmorLevel = config("2- Neutral Vikings", "Armor Level", 10, new ConfigDescription("Determines armor quality level.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), new object[1] { new RenegadeVikings.Utilities.ConfigurationManagerAttributes { ShowRangeAsPercent = false } })); _vikingsFood = config2("2- Neutral Vikings", "Taming Food", "CarrotSoup,DeerStew,FishWraps,HoneyGlazedChicken,MeatPlatter,MushroomOmelette,OnionSoup,SerpentStew,TurnipStew", "Neutral Vikings food and taming item.\nNeeds a Logout."); _vikingsFood.SettingChanged += delegate { GenerateVikingsFood(); }; ConfigData._renegadeTier1Health = config("3- Renegade Vikings", "RenegadeViking Tier1 Health", 100f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 500f), Array.Empty<object>())); ConfigData._renegadeTier2Health = config("3- Renegade Vikings", "RenegadeViking Tier2 Health", 150f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 500f), Array.Empty<object>())); ConfigData._renegadeTier3Health = config("3- Renegade Vikings", "RenegadeViking Tier3 Health", 200f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 500f), Array.Empty<object>())); ConfigData._renegadeTier4Health = config("3- Renegade Vikings", "RenegadeViking Tier4 Health", 250f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 500f), Array.Empty<object>())); ConfigData._renegadeTier5Health = config("3- Renegade Vikings", "RenegadeViking Tier5 Health", 300f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 500f), Array.Empty<object>())); ConfigData._renegadeTier6MagicHealth = config("3- Renegade Vikings", "RenegadeViking Tier6Magic Health", 350f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 500f), Array.Empty<object>())); ConfigData._renegadeTier6MeleeHealth = config("3- Renegade Vikings", "RenegadeViking Tier6Melee Health", 350f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 500f), Array.Empty<object>())); ConfigData._renegadeTier7MeleeHealth = config("3- Renegade Vikings", "RenegadeViking Tier7Melee Health", 400f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 1000f), Array.Empty<object>())); ConfigData._renegadeTier7MagicHealth = config("3- Renegade Vikings", "RenegadeViking Tier7Magic Health", 400f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 1000f), Array.Empty<object>())); ConfigData._renegadeArmorLevel = config("3- Renegade Vikings", "Armor Level", 1, new ConfigDescription("Determines armor quality level.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), new object[1] { new RenegadeVikings.Utilities.ConfigurationManagerAttributes { ShowRangeAsPercent = false } })); ConfigData._renegadeDmgLevel = config("3- Renegade Vikings", "Damage Level", 1, new ConfigDescription("Determines weapon quality level.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), new object[1] { new RenegadeVikings.Utilities.ConfigurationManagerAttributes { ShowRangeAsPercent = false } })); ConfigData._overlordT1Health = config("4- Overlord Vikings", "OverlordViking Tier1 Health", 500f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 1500f), Array.Empty<object>())); ConfigData._overlordT2Health = config("4- Overlord Vikings", "OverlordViking Tier2 Health", 2500f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 5000f), Array.Empty<object>())); ConfigData._overlordT3Health = config("4- Overlord Vikings", "OverlordViking Tier3 Health", 5000f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 7500f), Array.Empty<object>())); ConfigData._overlordT4Health = config("4- Overlord Vikings", "OverlordViking Tier4 Health", 7500f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 10000f), new object[1] { new RenegadeVikings.Utilities.ConfigurationManagerAttributes { ShowRangeAsPercent = false } })); ConfigData._overlordT5Health = config("4- Overlord Vikings", "OverlordViking Tier5 Health", 10000f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 12500f), Array.Empty<object>())); ConfigData._overlordT6Health = config("4- Overlord Vikings", "OverlordViking Tier6 Health", 12500f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 15000f), Array.Empty<object>())); ConfigData._overlordT6SHealth = config("4- Overlord Vikings", "OverlordViking Tier6Summoner Health", 12500f, new ConfigDescription("Base health points.", (AcceptableValueBase)(object)new AcceptableValueRange<float>(1f, 15000f), Array.Empty<object>())); ConfigData._overlordArmorLevel = config("4- Overlord Vikings", "Armor Level", 2, new ConfigDescription("Determines armor quality level.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), new object[1] { new RenegadeVikings.Utilities.ConfigurationManagerAttributes { ShowRangeAsPercent = false } })); ConfigData._overlordDmgLevel = config("4- Overlord Vikings", "Damage Level", 2, new ConfigDescription("Determines weapon quality level.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(1, 10), new object[1] { new RenegadeVikings.Utilities.ConfigurationManagerAttributes { ShowRangeAsPercent = false } })); ConfigSetup.Init(); Assembly executingAssembly = Assembly.GetExecutingAssembly(); _harmony.PatchAll(executingAssembly); PrefabContainerInit(); if (!File.Exists(ymlFullPath)) { CreateTraderYml(); Logging.LogWarning("File not found - " + traderYml + "!"); Logging.LogWarning("Creating a new one.."); } ReadTraderYaml(null, null); _TraderYml.ValueChanged += TraderYmlOnValueChanged; ConfigWatcher(); GenerateVikingsFood(); ((BaseUnityPlugin)this).Config.SaveOnConfigSet = true; ((BaseUnityPlugin)this).Config.Save(); } public static void TraderYmlOnValueChanged() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown GameObject[] array = Resources.FindObjectsOfTypeAll<GameObject>(); foreach (GameObject val in array) { if (!((Object)val).name.StartsWith("BLV_Trader")) { continue; } Trader component = val.GetComponent<Trader>(); if (!Object.op_Implicit((Object)(object)component)) { continue; } component.m_items.Clear(); foreach (TraderYaml item in _traderItem) { component.m_items.Add(new TradeItem { m_prefab = ObjectDB.instance.GetItemPrefab(item.m_prefab).GetComponent<ItemDrop>(), m_stack = item.m_stack, m_price = item.m_price, m_requiredGlobalKey = item.m_requiredGlobalKey }); } } Logging.LogDebug(traderYml + " changed.."); } private void OnDestroy() { ((BaseUnityPlugin)this).Config.Save(); } public static void PrefabContainerInit() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Expected O, but got Unknown _PrefabContainer = new GameObject("NpcPrefabs"); _PrefabContainer.SetActive(false); Object.DontDestroyOnLoad((Object)(object)_PrefabContainer); } private static void CreateTraderYml() { List<TraderYaml> graph = new List<TraderYaml> { new TraderYaml { m_prefab = "MeadHealthMinor", m_stack = 1, m_price = 80, m_requiredGlobalKey = "" }, new TraderYaml { m_prefab = "FishingRod", m_stack = 1, m_price = 450, m_requiredGlobalKey = "" }, new TraderYaml { m_prefab = "BeltStrength", m_stack = 1, m_price = 1150, m_requiredGlobalKey = "" }, new TraderYaml { m_prefab = "HelmetDverger", m_stack = 1, m_price = 700, m_requiredGlobalKey = "" }, new TraderYaml { m_prefab = "FishingBait", m_stack = 20, m_price = 25, m_requiredGlobalKey = "" }, new TraderYaml { m_prefab = "ChickenEgg", m_stack = 1, m_price = 2500, m_requiredGlobalKey = "defeated_eikthyr" } }; using StreamWriter writer = new StreamWriter(ymlFullPath); new SerializerBuilder().WithNamingConvention(CamelCaseNamingConvention.Instance).Build().Serialize(writer, graph); } private static AssetBundle GetAssetBundleFromResources(string filename) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); string name = Enumerable.Single(executingAssembly.GetManifestResourceNames(), (string x) => x.EndsWith(filename)); using Stream stream = executingAssembly.GetManifestResourceStream(name); return AssetBundle.LoadFromStream(stream); } private static void GenerateVikingsFood() { VikingsFood = new HashSet<string>(_vikingsFood.Value.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries)); } private static void TextBox(ConfigEntryBase entryBase) { entryBase.BoxedValue = GUILayout.TextArea((string)entryBase.BoxedValue, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); } } } namespace RenegadeVikings.VikingsData { public static class NeutralVikings { public static void Init(ZNetScene zNetScene) { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Expected O, but got Unknown GameObject val = zNetScene.GetPrefab("Player").Clone("BLV_NeutralVikings"); val.transform.SetParent(Plugin._PrefabContainer.transform, false); val.RemoveComponent(typeof(PlayerController)); val.RemoveComponent(typeof(Player)); val.RemoveComponent(typeof(Talker)); val.RemoveComponent(typeof(Skills)); Humanoid val2 = val.AddComponent<Humanoid>(); SetHumanoid(val2, zNetScene); SetMonsterAI(val.AddComponent<MonsterAI>(), zNetScene); ZNetView component = val.GetComponent<ZNetView>(); component.m_persistent = true; component.m_distant = false; component.m_type = (ObjectType)0; component.m_syncInitialScale = false; ZSyncTransform component2 = val.GetComponent<ZSyncTransform>(); component2.m_syncPosition = true; component2.m_syncRotation = true; component2.m_syncScale = false; component2.m_syncBodyVelocity = false; component2.m_characterParentSync = false; val.GetComponent<ZSyncAnimation>().m_smoothCharacterSpeeds = true; val.AddComponent<RenegadeSetup>(); SetupTameable(val.AddComponent<Tameable>(), zNetScene); SetupNpcTalk(val.AddComponent<NpcTalk>(), (Character)(object)val2); val.AddComponent<TamedFix>(); val.AddComponent<RandomAnimation>().m_values = new List<RandomValue>(1) { new RandomValue { m_name = "idle", m_values = 5, m_interval = 3f, m_floatValue = false, m_floatTransition = 1f } }; val.AddComponent<EquipmentAdjustment>(); zNetScene.AddClonedObject(val); } private static void SetHumanoid(Humanoid humanoid, ZNetScene zNetScene) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Expected O, but got Unknown //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Expected O, but got Unknown //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Expected O, but got Unknown //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Expected O, but got Unknown //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0275: 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_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Expected O, but got Unknown //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Expected O, but got Unknown ((Character)humanoid).m_group = "NeutralVikings"; ((Character)humanoid).m_faction = (Faction)10; ((Character)humanoid).m_crouchSpeed = 2f; ((Character)humanoid).m_walkSpeed = 1.6f; ((Character)humanoid).m_speed = 4f; ((Character)humanoid).m_turnSpeed = 300f; ((Character)humanoid).m_runSpeed = 7f; ((Character)humanoid).m_runTurnSpeed = 300f; ((Character)humanoid).m_acceleration = 0.8f; ((Character)humanoid).m_jumpForce = 8f; ((Character)humanoid).m_jumpForceForward = 2f; ((Character)humanoid).m_jumpForceTiredFactor = 0.6f; ((Character)humanoid).m_canSwim = true; ((Character)humanoid).m_swimDepth = 1.5f; ((Character)humanoid).m_swimSpeed = 2f; ((Character)humanoid).m_swimTurnSpeed = 100f; ((Character)humanoid).m_swimAcceleration = 0.05f; ((Character)humanoid).m_groundTilt = (GroundTiltType)0; ((Character)humanoid).m_groundTiltSpeed = 50f; ((Character)humanoid).m_eye = Utils.FindChild(((Component)humanoid).gameObject.transform, "EyePos", (IterativeSearchType)0); ((Character)humanoid).m_hitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_player_hit"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("sfx_hit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_critHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_crit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_backstabHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_backstab"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_deathEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_player_death"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("BLV_VikingRagdoll"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_tolerateWater = true; ConfigData._neutralHealth.SettingChanged += delegate { ((Character)humanoid).m_health = ConfigData._neutralHealth.Value; }; ((Character)humanoid).m_health = ConfigData._neutralHealth.Value; ((Character)humanoid).m_damageModifiers = new DamageModifiers { m_blunt = (DamageModifier)0, m_slash = (DamageModifier)0, m_pierce = (DamageModifier)0, m_chop = (DamageModifier)3, m_pickaxe = (DamageModifier)3, m_fire = (DamageModifier)0, m_frost = (DamageModifier)0, m_lightning = (DamageModifier)0, m_spirit = (DamageModifier)3 }; ((Character)humanoid).m_staggerWhenBlocked = true; ((Character)humanoid).m_staggerDamageFactor = 0.4f; humanoid.m_consumeItemEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_creature_consume"), m_enabled = true, m_variant = -1 } }; } private static void SetMonsterAI(MonsterAI monsterAI, ZNetScene zNetScene) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_006e: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) ((BaseAI)monsterAI).m_viewRange = 40f; ((BaseAI)monsterAI).m_viewAngle = 90f; ((BaseAI)monsterAI).m_hearRange = 9999f; ((BaseAI)monsterAI).m_mistVision = false; ((BaseAI)monsterAI).m_alertedEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_alerted"), m_enabled = true, m_variant = -1 } }; ((BaseAI)monsterAI).m_idleSound.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_idle"), m_enabled = true, m_variant = 0 } }; ((BaseAI)monsterAI).m_idleSoundInterval = 10f; ((BaseAI)monsterAI).m_idleSoundChance = 0.5f; ((BaseAI)monsterAI).m_pathAgentType = (AgentType)1; ((BaseAI)monsterAI).m_moveMinAngle = 90f; ((BaseAI)monsterAI).m_smoothMovement = true; ((BaseAI)monsterAI).m_serpentMovement = false; ((BaseAI)monsterAI).m_jumpInterval = 0f; ((BaseAI)monsterAI).m_randomCircleInterval = 2f; ((BaseAI)monsterAI).m_randomMoveInterval = 10f; ((BaseAI)monsterAI).m_randomMoveRange = 10f; ((BaseAI)monsterAI).m_avoidFire = false; ((BaseAI)monsterAI).m_afraidOfFire = false; ((BaseAI)monsterAI).m_avoidWater = true; ((BaseAI)monsterAI).m_aggravatable = false; monsterAI.m_alertRange = 20f; monsterAI.m_fleeIfHurtWhenTargetCantBeReached = true; monsterAI.m_fleeIfNotAlerted = false; monsterAI.m_fleeIfLowHealth = 0f; monsterAI.m_circulateWhileCharging = false; monsterAI.m_circulateWhileChargingFlying = false; monsterAI.m_enableHuntPlayer = false; monsterAI.m_attackPlayerObjects = false; monsterAI.m_privateAreaTriggerTreshold = 5; monsterAI.m_interceptTimeMax = 2f; monsterAI.m_interceptTimeMin = 0f; monsterAI.m_maxChaseDistance = 0f; monsterAI.m_minAttackInterval = 0f; monsterAI.m_circleTargetInterval = 5f; monsterAI.m_circleTargetDuration = 2f; monsterAI.m_circleTargetDistance = 5f; if (Plugin.VikingsFood.Count != 0) { monsterAI.m_consumeItems = new List<ItemDrop>(); foreach (ItemDrop item in Enumerable.Select(Enumerable.Where(Plugin.VikingsFood, (string name) => (Object)(object)ObjectDB.instance.GetItemPrefab(name) != (Object)null), (string name) => ObjectDB.instance.GetItemPrefab(name).GetComponent<ItemDrop>())) { monsterAI.m_consumeItems.Add(item); } } monsterAI.m_consumeRange = 1.4f; monsterAI.m_consumeSearchRange = 20f; monsterAI.m_consumeSearchInterval = 10f; } private static void SetupTameable(Tameable tameable, ZNetScene zNetScene) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown tameable.m_fedDuration = 600f; tameable.m_tamingTime = 1800f; tameable.m_tamedEffect.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_creature_tamed"), m_enabled = true, m_variant = -1 } }; tameable.m_sootheEffect.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_creature_soothed"), m_enabled = true, m_variant = -1 } }; tameable.m_petEffect.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_skeleton_pet"), m_enabled = true, m_variant = 0 } }; tameable.m_commandable = true; tameable.m_unsummonDistance = 0f; tameable.m_unsummonOnOwnerLogoutSeconds = 0f; } private static void SetupNpcTalk(NpcTalk npcTalk, Character character) { List<string> randomTalk = new List<string> { "$blv_neutralrandomtalk1", "$blv_neutralrandomtalk2", "$blv_neutralrandomtalk3", "$blv_neutralrandomtalk4", "$blv_neutralrandomtalk5", "$blv_neutralrandomtalk6", "$blv_neutralrandomtalk7", "$blv_neutralrandomtalk8", "$blv_neutralrandomtalk9", "$blv_neutralrandomtalk10" }; npcTalk.m_name = character.m_name; npcTalk.m_maxRange = 20f; npcTalk.m_greetRange = 0f; npcTalk.m_byeRange = 0f; npcTalk.m_offset = 2.2f; npcTalk.m_minTalkInterval = 3f; npcTalk.m_hideDialogDelay = 9f; npcTalk.m_randomTalkInterval = 30f; npcTalk.m_randomTalkChance = 0.75f; npcTalk.m_randomTalk = randomTalk; } } public static class TraderViking { public static void Init(ZNetScene zNetScene) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Expected O, but got Unknown GameObject val = zNetScene.GetPrefab("Player").Clone("BLV_TraderViking"); val.transform.SetParent(Plugin._PrefabContainer.transform, false); val.RemoveComponent(typeof(PlayerController)); val.RemoveComponent(typeof(Player)); val.RemoveComponent(typeof(Talker)); val.RemoveComponent(typeof(Skills)); SetHumanoid(val.AddComponent<Humanoid>(), zNetScene); SetMonsterAI(val.AddComponent<MonsterAI>(), zNetScene); ZNetView component = val.GetComponent<ZNetView>(); component.m_persistent = true; component.m_distant = false; component.m_type = (ObjectType)0; component.m_syncInitialScale = false; ZSyncTransform component2 = val.GetComponent<ZSyncTransform>(); component2.m_syncPosition = true; component2.m_syncRotation = true; component2.m_syncScale = false; component2.m_syncBodyVelocity = false; component2.m_characterParentSync = false; val.GetComponent<ZSyncAnimation>().m_smoothCharacterSpeeds = true; val.AddComponent<RenegadeSetup>(); SetupTrader(val.AddComponent<Trader>()); val.AddComponent<RandomAnimation>().m_values = new List<RandomValue>(1) { new RandomValue { m_name = "idle", m_values = 5, m_interval = 3f, m_floatValue = false, m_floatTransition = 1f } }; val.AddComponent<EquipmentAdjustment>(); LookAt obj = ((Component)Utils.FindChild(val.transform, "Visual", (IterativeSearchType)0)).gameObject.AddComponent<LookAt>(); obj.m_bodyWeight = 0.5f; obj.m_headWeight = 1f; obj.m_eyesWeight = 0f; obj.m_smoothTime = 1f; Plugin._TraderYml.ValueChanged += Plugin.TraderYmlOnValueChanged; zNetScene.AddClonedObject(val); } private static void SetHumanoid(Humanoid humanoid, ZNetScene zNetScene) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Expected O, but got Unknown //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Expected O, but got Unknown //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0285: 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) ((Character)humanoid).m_name = "$blv_tradername"; ((Character)humanoid).m_group = "TraderVikings"; ((Character)humanoid).m_faction = (Faction)10; ((Character)humanoid).m_aiSkipTarget = true; ((Character)humanoid).m_crouchSpeed = 2f; ((Character)humanoid).m_walkSpeed = 1f; ((Character)humanoid).m_speed = 2f; ((Character)humanoid).m_turnSpeed = 300f; ((Character)humanoid).m_runSpeed = 3f; ((Character)humanoid).m_runTurnSpeed = 300f; ((Character)humanoid).m_acceleration = 0.8f; ((Character)humanoid).m_jumpForce = 8f; ((Character)humanoid).m_jumpForceForward = 2f; ((Character)humanoid).m_jumpForceTiredFactor = 0.6f; ((Character)humanoid).m_canSwim = true; ((Character)humanoid).m_swimDepth = 1.5f; ((Character)humanoid).m_swimSpeed = 2f; ((Character)humanoid).m_swimTurnSpeed = 100f; ((Character)humanoid).m_swimAcceleration = 0.05f; ((Character)humanoid).m_groundTilt = (GroundTiltType)0; ((Character)humanoid).m_groundTiltSpeed = 50f; ((Character)humanoid).m_eye = Utils.FindChild(((Component)humanoid).gameObject.transform, "EyePos", (IterativeSearchType)0); ((Character)humanoid).m_hitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_player_hit"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("sfx_hit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_critHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_crit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_backstabHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_backstab"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_deathEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_player_death"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("BLV_VikingRagdoll"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_tolerateWater = true; ((Character)humanoid).m_health = 100f; ((Character)humanoid).m_damageModifiers = new DamageModifiers { m_blunt = (DamageModifier)3, m_slash = (DamageModifier)3, m_pierce = (DamageModifier)3, m_chop = (DamageModifier)3, m_pickaxe = (DamageModifier)3, m_fire = (DamageModifier)3, m_frost = (DamageModifier)3, m_lightning = (DamageModifier)3, m_spirit = (DamageModifier)3 }; ((Character)humanoid).m_staggerWhenBlocked = false; ((Character)humanoid).m_staggerDamageFactor = 0f; } private static void SetMonsterAI(MonsterAI monsterAI, ZNetScene zNetScene) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_006e: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) ((BaseAI)monsterAI).m_viewRange = 40f; ((BaseAI)monsterAI).m_viewAngle = 90f; ((BaseAI)monsterAI).m_hearRange = 0f; ((BaseAI)monsterAI).m_mistVision = false; ((BaseAI)monsterAI).m_alertedEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_alerted"), m_enabled = true, m_variant = -1 } }; ((BaseAI)monsterAI).m_idleSound.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_idle"), m_enabled = true, m_variant = 0 } }; ((BaseAI)monsterAI).m_idleSoundInterval = 10f; ((BaseAI)monsterAI).m_idleSoundChance = 0.5f; ((BaseAI)monsterAI).m_pathAgentType = (AgentType)1; ((BaseAI)monsterAI).m_moveMinAngle = 90f; ((BaseAI)monsterAI).m_smoothMovement = true; ((BaseAI)monsterAI).m_serpentMovement = false; ((BaseAI)monsterAI).m_jumpInterval = 0f; ((BaseAI)monsterAI).m_randomCircleInterval = 25f; ((BaseAI)monsterAI).m_randomMoveInterval = 25f; ((BaseAI)monsterAI).m_randomMoveRange = 2f; ((BaseAI)monsterAI).m_avoidFire = false; ((BaseAI)monsterAI).m_afraidOfFire = false; ((BaseAI)monsterAI).m_avoidWater = true; ((BaseAI)monsterAI).m_aggravatable = false; monsterAI.m_alertRange = 0f; monsterAI.m_fleeIfHurtWhenTargetCantBeReached = false; monsterAI.m_fleeIfNotAlerted = false; monsterAI.m_fleeIfLowHealth = 0f; monsterAI.m_circulateWhileCharging = false; monsterAI.m_circulateWhileChargingFlying = false; monsterAI.m_enableHuntPlayer = false; monsterAI.m_attackPlayerObjects = false; monsterAI.m_privateAreaTriggerTreshold = 0; monsterAI.m_interceptTimeMax = 2f; monsterAI.m_interceptTimeMin = 0f; monsterAI.m_maxChaseDistance = 0f; monsterAI.m_minAttackInterval = 0f; monsterAI.m_circleTargetInterval = 5f; monsterAI.m_circleTargetDuration = 2f; monsterAI.m_circleTargetDistance = 5f; } private static void SetupTrader(Trader trader) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Expected O, but got Unknown //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Expected O, but got Unknown //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: 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_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Expected O, but got Unknown //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Expected O, but got Unknown //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Expected O, but got Unknown trader.m_name = "$blv_tradername"; trader.m_standRange = 16f; trader.m_greetRange = 10f; trader.m_byeRange = 15f; trader.m_items.Clear(); foreach (TraderYaml item in Plugin._traderItem) { trader.m_items.Add(new TradeItem { m_prefab = ObjectDB.instance.GetItemPrefab(item.m_prefab).GetComponent<ItemDrop>(), m_stack = item.m_stack, m_price = item.m_price, m_requiredGlobalKey = item.m_requiredGlobalKey }); } trader.m_hideDialogDelay = 5f; trader.m_randomTalkInterval = 30f; trader.m_randomTalk = new List<string>(3) { "$blv_tradertalk1", "$blv_tradertalk2", "$blv_tradertalk3" }; trader.m_randomGreets = new List<string>(2) { "$blv_tradergreet1", "$blv_tradergreet2" }; trader.m_randomGoodbye = new List<string>(2) { "$blv_traderbye1", "$blv_traderbye2" }; trader.m_randomStartTrade = new List<string>(5) { "$npc_haldor_random_starttrade1", "$npc_haldor_random_starttrade2", "$npc_haldor_random_starttrade3", "$npc_haldor_random_starttrade4", "$npc_haldor_random_starttrade5" }; trader.m_randomBuy = new List<string>(5) { "$npc_haldor_random_buy1", "$npc_haldor_random_buy2", "$npc_haldor_random_buy3", "$npc_haldor_random_buy4", "$npc_haldor_random_buy5" }; trader.m_randomSell = new List<string>(4) { "$npc_haldor_random_sell1", "$npc_haldor_random_sell2", "$npc_haldor_random_sell3", "$npc_haldor_random_sell4" }; trader.m_randomGreetFX.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = ZNetScene.instance.GetPrefab("sfx_haldor_greet"), m_enabled = true, m_variant = -1 } }; trader.m_randomStartTradeFX.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = ZNetScene.instance.GetPrefab("sfx_haldor_laugh"), m_enabled = true, m_variant = -1 } }; trader.m_randomBuyFX.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = ZNetScene.instance.GetPrefab("sfx_haldor_yea"), m_enabled = true, m_variant = -1 } }; trader.m_randomSellFX.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = ZNetScene.instance.GetPrefab("sfx_haldor_yea"), m_enabled = true, m_variant = -1 } }; } } } namespace RenegadeVikings.VikingsData.Renegade { public static class RenegadeVikingT1 { public static void Init(ZNetScene zNetScene) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown GameObject val = zNetScene.GetPrefab("Player").Clone("BLV_RenegadeVikingT1"); val.transform.SetParent(Plugin._PrefabContainer.transform, false); val.RemoveComponent(typeof(PlayerController)); val.RemoveComponent(typeof(Player)); val.RemoveComponent(typeof(Talker)); val.RemoveComponent(typeof(Skills)); SetHumanoid(val.AddComponent<Humanoid>(), zNetScene); SetMonsterAI(val.AddComponent<MonsterAI>(), zNetScene); ZNetView component = val.GetComponent<ZNetView>(); component.m_persistent = true; component.m_distant = false; component.m_type = (ObjectType)0; component.m_syncInitialScale = false; ZSyncTransform component2 = val.GetComponent<ZSyncTransform>(); component2.m_syncPosition = true; component2.m_syncRotation = true; component2.m_syncScale = false; component2.m_syncBodyVelocity = false; component2.m_characterParentSync = false; val.GetComponent<ZSyncAnimation>().m_smoothCharacterSpeeds = true; val.AddComponent<RenegadeSetup>(); SetDropList(val.AddComponent<CharacterDrop>(), zNetScene); val.AddComponent<RandomAnimation>().m_values = new List<RandomValue>(1) { new RandomValue { m_name = "idle", m_values = 5, m_interval = 3f, m_floatValue = false, m_floatTransition = 1f } }; val.AddComponent<EquipmentAdjustment>(); zNetScene.AddClonedObject(val); } private static void SetHumanoid(Humanoid humanoid, ZNetScene zNetScene) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Expected O, but got Unknown //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Expected O, but got Unknown //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Expected O, but got Unknown ((Character)humanoid).m_name = "$blv_renegademeadows"; ((Character)humanoid).m_group = "T1Vikings"; ((Character)humanoid).m_faction = (Faction)4; ((Character)humanoid).m_crouchSpeed = 2f; ((Character)humanoid).m_walkSpeed = 1.6f; ((Character)humanoid).m_speed = 4f; ((Character)humanoid).m_turnSpeed = 300f; ((Character)humanoid).m_runSpeed = 7f; ((Character)humanoid).m_runTurnSpeed = 300f; ((Character)humanoid).m_acceleration = 0.8f; ((Character)humanoid).m_jumpForce = 8f; ((Character)humanoid).m_jumpForceForward = 2f; ((Character)humanoid).m_jumpForceTiredFactor = 0.6f; ((Character)humanoid).m_canSwim = true; ((Character)humanoid).m_swimDepth = 1.5f; ((Character)humanoid).m_swimSpeed = 2f; ((Character)humanoid).m_swimTurnSpeed = 100f; ((Character)humanoid).m_swimAcceleration = 0.05f; ((Character)humanoid).m_groundTilt = (GroundTiltType)0; ((Character)humanoid).m_groundTiltSpeed = 50f; ((Character)humanoid).m_eye = Utils.FindChild(((Component)humanoid).gameObject.transform, "EyePos", (IterativeSearchType)0); ((Character)humanoid).m_hitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_player_hit"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("sfx_hit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_critHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_crit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_backstabHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_backstab"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_deathEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_ghost_death"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("sfx_ghost_death"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_tolerateWater = true; ConfigData._renegadeTier1Health.SettingChanged += delegate { ((Character)humanoid).m_health = ConfigData._renegadeTier1Health.Value; }; ((Character)humanoid).m_health = ConfigData._renegadeTier1Health.Value; ((Character)humanoid).m_damageModifiers = new DamageModifiers { m_blunt = (DamageModifier)0, m_slash = (DamageModifier)0, m_pierce = (DamageModifier)0, m_chop = (DamageModifier)3, m_pickaxe = (DamageModifier)3, m_fire = (DamageModifier)0, m_frost = (DamageModifier)0, m_lightning = (DamageModifier)0, m_spirit = (DamageModifier)3 }; ((Character)humanoid).m_staggerWhenBlocked = true; ((Character)humanoid).m_staggerDamageFactor = 0.4f; Humanoid obj = humanoid; ItemSet[] array = new ItemSet[1]; ItemSet val = new ItemSet(); val.m_items = (GameObject[])(object)new GameObject[4] { ObjectDB.instance.GetItemPrefab("HelmetLeather"), ObjectDB.instance.GetItemPrefab("ArmorLeatherChest"), ObjectDB.instance.GetItemPrefab("ArmorLeatherLegs"), ObjectDB.instance.GetItemPrefab("CapeDeerHide") }; array[0] = val; obj.m_randomSets = (ItemSet[])(object)array; } private static void SetMonsterAI(MonsterAI monsterAI, ZNetScene zNetScene) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_006e: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) ((BaseAI)monsterAI).m_viewRange = 40f; ((BaseAI)monsterAI).m_viewAngle = 90f; ((BaseAI)monsterAI).m_hearRange = 9999f; ((BaseAI)monsterAI).m_mistVision = false; ((BaseAI)monsterAI).m_alertedEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_alerted"), m_enabled = true, m_variant = -1 } }; ((BaseAI)monsterAI).m_idleSound.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_idle"), m_enabled = true, m_variant = 0 } }; ((BaseAI)monsterAI).m_idleSoundInterval = 10f; ((BaseAI)monsterAI).m_idleSoundChance = 0.5f; ((BaseAI)monsterAI).m_pathAgentType = (AgentType)1; ((BaseAI)monsterAI).m_moveMinAngle = 90f; ((BaseAI)monsterAI).m_smoothMovement = true; ((BaseAI)monsterAI).m_serpentMovement = false; ((BaseAI)monsterAI).m_jumpInterval = 0f; ((BaseAI)monsterAI).m_randomCircleInterval = 2f; ((BaseAI)monsterAI).m_randomMoveInterval = 10f; ((BaseAI)monsterAI).m_randomMoveRange = 10f; ((BaseAI)monsterAI).m_avoidFire = false; ((BaseAI)monsterAI).m_afraidOfFire = false; ((BaseAI)monsterAI).m_avoidWater = true; ((BaseAI)monsterAI).m_aggravatable = true; monsterAI.m_alertRange = 20f; monsterAI.m_fleeIfHurtWhenTargetCantBeReached = true; monsterAI.m_fleeIfNotAlerted = false; monsterAI.m_fleeIfLowHealth = 0f; monsterAI.m_circulateWhileCharging = false; monsterAI.m_circulateWhileChargingFlying = false; monsterAI.m_enableHuntPlayer = false; monsterAI.m_attackPlayerObjects = true; monsterAI.m_privateAreaTriggerTreshold = 5; monsterAI.m_interceptTimeMax = 2f; monsterAI.m_interceptTimeMin = 0f; monsterAI.m_maxChaseDistance = 0f; monsterAI.m_minAttackInterval = 0f; monsterAI.m_circleTargetInterval = 5f; monsterAI.m_circleTargetDuration = 2f; monsterAI.m_circleTargetDistance = 5f; } private static void SetDropList(CharacterDrop characterDrop, ZNetScene zNetScene) { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Expected O, but got Unknown string[] array = ConfigData._renegadeT1CDrop1.Value?.Split(':', ' '); string[] array2 = ConfigData._renegadeT1CDrop2.Value?.Split(':', ' '); string[] array3 = ConfigData._renegadeT1CDrop3.Value?.Split(':', ' '); string[] array4 = ConfigData._renegadeT1CDrop4.Value?.Split(':', ' '); List<Drop> drops = new List<Drop> { new Drop { m_prefab = zNetScene.GetPrefab(StringExtensionMethods.GetStableHashCode(array[0])), m_amountMin = int.Parse(array[1]), m_amountMax = int.Parse(array[2]), m_chance = float.Parse(array[3]), m_onePerPlayer = bool.Parse(array[4]), m_levelMultiplier = bool.Parse(array[5]), m_dontScale = bool.Parse(array[6]) }, new Drop { m_prefab = zNetScene.GetPrefab(StringExtensionMethods.GetStableHashCode(array2[0])), m_amountMin = int.Parse(array2[1]), m_amountMax = int.Parse(array2[2]), m_chance = float.Parse(array2[3]), m_onePerPlayer = bool.Parse(array2[4]), m_levelMultiplier = bool.Parse(array2[5]), m_dontScale = bool.Parse(array2[6]) }, new Drop { m_prefab = zNetScene.GetPrefab(StringExtensionMethods.GetStableHashCode(array3[0])), m_amountMin = int.Parse(array3[1]), m_amountMax = int.Parse(array3[2]), m_chance = float.Parse(array3[3]), m_onePerPlayer = bool.Parse(array3[4]), m_levelMultiplier = bool.Parse(array3[5]), m_dontScale = bool.Parse(array3[6]) }, new Drop { m_prefab = zNetScene.GetPrefab(StringExtensionMethods.GetStableHashCode(array4[0])), m_amountMin = int.Parse(array4[1]), m_amountMax = int.Parse(array4[2]), m_chance = float.Parse(array4[3]), m_onePerPlayer = bool.Parse(array4[4]), m_levelMultiplier = bool.Parse(array4[5]), m_dontScale = bool.Parse(array4[6]) } }; characterDrop.m_drops = drops; } } public static class RenegadeVikingT2 { public static void Init(ZNetScene zNetScene) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown GameObject val = zNetScene.GetPrefab("Player").Clone("BLV_RenegadeVikingT2"); val.transform.SetParent(Plugin._PrefabContainer.transform, false); val.RemoveComponent(typeof(PlayerController)); val.RemoveComponent(typeof(Player)); val.RemoveComponent(typeof(Talker)); val.RemoveComponent(typeof(Skills)); SetHumanoid(val.AddComponent<Humanoid>(), zNetScene); SetMonsterAI(val.AddComponent<MonsterAI>(), zNetScene); ZNetView component = val.GetComponent<ZNetView>(); component.m_persistent = true; component.m_distant = false; component.m_type = (ObjectType)0; component.m_syncInitialScale = false; ZSyncTransform component2 = val.GetComponent<ZSyncTransform>(); component2.m_syncPosition = true; component2.m_syncRotation = true; component2.m_syncScale = false; component2.m_syncBodyVelocity = false; component2.m_characterParentSync = false; val.GetComponent<ZSyncAnimation>().m_smoothCharacterSpeeds = true; val.AddComponent<RenegadeSetup>(); SetDropList(val.AddComponent<CharacterDrop>(), zNetScene); val.AddComponent<RandomAnimation>().m_values = new List<RandomValue>(1) { new RandomValue { m_name = "idle", m_values = 5, m_interval = 3f, m_floatValue = false, m_floatTransition = 1f } }; val.AddComponent<EquipmentAdjustment>(); zNetScene.AddClonedObject(val); } private static void SetHumanoid(Humanoid humanoid, ZNetScene zNetScene) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Expected O, but got Unknown //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Expected O, but got Unknown //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Expected O, but got Unknown //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Expected O, but got Unknown ((Character)humanoid).m_name = "$blv_renegadeblackforest"; ((Character)humanoid).m_group = "T2Vikings"; ((Character)humanoid).m_faction = (Faction)4; ((Character)humanoid).m_crouchSpeed = 2f; ((Character)humanoid).m_walkSpeed = 1.6f; ((Character)humanoid).m_speed = 4f; ((Character)humanoid).m_turnSpeed = 300f; ((Character)humanoid).m_runSpeed = 7f; ((Character)humanoid).m_runTurnSpeed = 300f; ((Character)humanoid).m_acceleration = 0.8f; ((Character)humanoid).m_jumpForce = 8f; ((Character)humanoid).m_jumpForceForward = 2f; ((Character)humanoid).m_jumpForceTiredFactor = 0.6f; ((Character)humanoid).m_canSwim = true; ((Character)humanoid).m_swimDepth = 1.5f; ((Character)humanoid).m_swimSpeed = 2f; ((Character)humanoid).m_swimTurnSpeed = 100f; ((Character)humanoid).m_swimAcceleration = 0.05f; ((Character)humanoid).m_groundTilt = (GroundTiltType)0; ((Character)humanoid).m_groundTiltSpeed = 50f; ((Character)humanoid).m_eye = Utils.FindChild(((Component)humanoid).gameObject.transform, "EyePos", (IterativeSearchType)0); ((Character)humanoid).m_hitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_player_hit"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("sfx_hit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_critHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_crit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_backstabHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_backstab"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_deathEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_ghost_death"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("sfx_ghost_death"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_tolerateWater = true; ConfigData._renegadeTier2Health.SettingChanged += delegate { ((Character)humanoid).m_health = ConfigData._renegadeTier2Health.Value; }; ((Character)humanoid).m_health = ConfigData._renegadeTier2Health.Value; ((Character)humanoid).m_damageModifiers = new DamageModifiers { m_blunt = (DamageModifier)0, m_slash = (DamageModifier)0, m_pierce = (DamageModifier)0, m_chop = (DamageModifier)3, m_pickaxe = (DamageModifier)3, m_fire = (DamageModifier)0, m_frost = (DamageModifier)0, m_lightning = (DamageModifier)0, m_spirit = (DamageModifier)3 }; ((Character)humanoid).m_staggerWhenBlocked = true; ((Character)humanoid).m_staggerDamageFactor = 0.4f; Humanoid obj = humanoid; ItemSet[] array = new ItemSet[2]; ItemSet val = new ItemSet(); val.m_items = (GameObject[])(object)new GameObject[4] { ObjectDB.instance.GetItemPrefab("HelmetBronze"), ObjectDB.instance.GetItemPrefab("ArmorBronzeChest"), ObjectDB.instance.GetItemPrefab("ArmorBronzeLegs"), ObjectDB.instance.GetItemPrefab("CapeDeerHide") }; array[0] = val; val = new ItemSet(); val.m_items = (GameObject[])(object)new GameObject[4] { ObjectDB.instance.GetItemPrefab("HelmetTrollLeather"), ObjectDB.instance.GetItemPrefab("ArmorTrollLeatherChest"), ObjectDB.instance.GetItemPrefab("ArmorTrollLeatherLegs"), ObjectDB.instance.GetItemPrefab("CapeTrollHide") }; array[1] = val; obj.m_randomSets = (ItemSet[])(object)array; } private static void SetMonsterAI(MonsterAI monsterAI, ZNetScene zNetScene) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_006e: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) ((BaseAI)monsterAI).m_viewRange = 40f; ((BaseAI)monsterAI).m_viewAngle = 90f; ((BaseAI)monsterAI).m_hearRange = 9999f; ((BaseAI)monsterAI).m_mistVision = false; ((BaseAI)monsterAI).m_alertedEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_alerted"), m_enabled = true, m_variant = -1 } }; ((BaseAI)monsterAI).m_idleSound.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_idle"), m_enabled = true, m_variant = 0 } }; ((BaseAI)monsterAI).m_idleSoundInterval = 10f; ((BaseAI)monsterAI).m_idleSoundChance = 0.5f; ((BaseAI)monsterAI).m_pathAgentType = (AgentType)1; ((BaseAI)monsterAI).m_moveMinAngle = 90f; ((BaseAI)monsterAI).m_smoothMovement = true; ((BaseAI)monsterAI).m_serpentMovement = false; ((BaseAI)monsterAI).m_jumpInterval = 0f; ((BaseAI)monsterAI).m_randomCircleInterval = 2f; ((BaseAI)monsterAI).m_randomMoveInterval = 10f; ((BaseAI)monsterAI).m_randomMoveRange = 10f; ((BaseAI)monsterAI).m_avoidFire = false; ((BaseAI)monsterAI).m_afraidOfFire = false; ((BaseAI)monsterAI).m_avoidWater = true; ((BaseAI)monsterAI).m_aggravatable = false; monsterAI.m_alertRange = 20f; monsterAI.m_fleeIfHurtWhenTargetCantBeReached = true; monsterAI.m_fleeIfNotAlerted = false; monsterAI.m_fleeIfLowHealth = 0f; monsterAI.m_circulateWhileCharging = false; monsterAI.m_enableHuntPlayer = false; monsterAI.m_attackPlayerObjects = true; monsterAI.m_privateAreaTriggerTreshold = 5; monsterAI.m_interceptTimeMax = 2f; monsterAI.m_interceptTimeMin = 0f; monsterAI.m_maxChaseDistance = 0f; monsterAI.m_minAttackInterval = 0f; monsterAI.m_circleTargetInterval = 5f; monsterAI.m_circleTargetDuration = 2f; monsterAI.m_circleTargetDistance = 5f; } private static void SetDropList(CharacterDrop characterDrop, ZNetScene zNetScene) { //IL_006e: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Expected O, but got Unknown string[] array = ConfigData._renegadeT2CDrop1.Value?.Split(':'); string[] array2 = ConfigData._renegadeT2CDrop2.Value?.Split(':'); string[] array3 = ConfigData._renegadeT2CDrop3.Value?.Split(':'); string[] array4 = ConfigData._renegadeT2CDrop4.Value?.Split(':'); List<Drop> drops = new List<Drop> { new Drop { m_prefab = zNetScene.GetPrefab(StringExtensionMethods.GetStableHashCode(array[0])), m_amountMin = int.Parse(array[1]), m_amountMax = int.Parse(array[2]), m_chance = float.Parse(array[3]), m_onePerPlayer = bool.Parse(array[4]), m_levelMultiplier = bool.Parse(array[5]), m_dontScale = bool.Parse(array[6]) }, new Drop { m_prefab = zNetScene.GetPrefab(StringExtensionMethods.GetStableHashCode(array2[0])), m_amountMin = int.Parse(array2[1]), m_amountMax = int.Parse(array2[2]), m_chance = float.Parse(array2[3]), m_onePerPlayer = bool.Parse(array2[4]), m_levelMultiplier = bool.Parse(array2[5]), m_dontScale = bool.Parse(array2[6]) }, new Drop { m_prefab = zNetScene.GetPrefab(StringExtensionMethods.GetStableHashCode(array3[0])), m_amountMin = int.Parse(array3[1]), m_amountMax = int.Parse(array3[2]), m_chance = float.Parse(array3[3]), m_onePerPlayer = bool.Parse(array3[4]), m_levelMultiplier = bool.Parse(array3[5]), m_dontScale = bool.Parse(array3[6]) }, new Drop { m_prefab = zNetScene.GetPrefab(StringExtensionMethods.GetStableHashCode(array4[0])), m_amountMin = int.Parse(array4[1]), m_amountMax = int.Parse(array4[2]), m_chance = float.Parse(array4[3]), m_onePerPlayer = bool.Parse(array4[4]), m_levelMultiplier = bool.Parse(array4[5]), m_dontScale = bool.Parse(array4[6]) } }; characterDrop.m_drops = drops; } } public static class RenegadeVikingT3 { public static void Init(ZNetScene zNetScene) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown GameObject val = zNetScene.GetPrefab("Player").Clone("BLV_RenegadeVikingT3"); val.transform.SetParent(Plugin._PrefabContainer.transform, false); val.RemoveComponent(typeof(PlayerController)); val.RemoveComponent(typeof(Player)); val.RemoveComponent(typeof(Talker)); val.RemoveComponent(typeof(Skills)); SetHumanoid(val.AddComponent<Humanoid>(), zNetScene); SetMonsterAI(val.AddComponent<MonsterAI>(), zNetScene); ZNetView component = val.GetComponent<ZNetView>(); component.m_persistent = true; component.m_distant = false; component.m_type = (ObjectType)0; component.m_syncInitialScale = false; ZSyncTransform component2 = val.GetComponent<ZSyncTransform>(); component2.m_syncPosition = true; component2.m_syncRotation = true; component2.m_syncScale = false; component2.m_syncBodyVelocity = false; component2.m_characterParentSync = false; val.GetComponent<ZSyncAnimation>().m_smoothCharacterSpeeds = true; val.AddComponent<RenegadeSetup>(); SetDropList(val.AddComponent<CharacterDrop>(), zNetScene); val.AddComponent<RandomAnimation>().m_values = new List<RandomValue>(1) { new RandomValue { m_name = "idle", m_values = 5, m_interval = 3f, m_floatValue = false, m_floatTransition = 1f } }; val.AddComponent<EquipmentAdjustment>(); zNetScene.AddClonedObject(val); } private static void SetHumanoid(Humanoid humanoid, ZNetScene zNetScene) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Expected O, but got Unknown //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Expected O, but got Unknown //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Expected O, but got Unknown //IL_0258: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Expected O, but got Unknown //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Expected O, but got Unknown //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Expected O, but got Unknown //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Expected O, but got Unknown ((Character)humanoid).m_name = "$blv_renegadeswamps"; ((Character)humanoid).m_group = "T3Vikings"; ((Character)humanoid).m_faction = (Faction)4; ((Character)humanoid).m_crouchSpeed = 2f; ((Character)humanoid).m_walkSpeed = 1.6f; ((Character)humanoid).m_speed = 4f; ((Character)humanoid).m_turnSpeed = 300f; ((Character)humanoid).m_runSpeed = 7f; ((Character)humanoid).m_runTurnSpeed = 300f; ((Character)humanoid).m_acceleration = 0.8f; ((Character)humanoid).m_jumpForce = 8f; ((Character)humanoid).m_jumpForceForward = 2f; ((Character)humanoid).m_jumpForceTiredFactor = 0.6f; ((Character)humanoid).m_canSwim = true; ((Character)humanoid).m_swimDepth = 1.5f; ((Character)humanoid).m_swimSpeed = 2f; ((Character)humanoid).m_swimTurnSpeed = 100f; ((Character)humanoid).m_swimAcceleration = 0.05f; ((Character)humanoid).m_groundTilt = (GroundTiltType)0; ((Character)humanoid).m_groundTiltSpeed = 50f; ((Character)humanoid).m_eye = Utils.FindChild(((Component)humanoid).gameObject.transform, "EyePos", (IterativeSearchType)0); ((Character)humanoid).m_hitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_player_hit"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("sfx_hit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_critHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_crit"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_backstabHitEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("fx_backstab"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_deathEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[2] { new EffectData { m_prefab = zNetScene.GetPrefab("vfx_ghost_death"), m_enabled = true, m_variant = -1 }, new EffectData { m_prefab = zNetScene.GetPrefab("sfx_ghost_death"), m_enabled = true, m_variant = -1 } }; ((Character)humanoid).m_tolerateWater = true; ConfigData._renegadeTier3Health.SettingChanged += delegate { ((Character)humanoid).m_health = ConfigData._renegadeTier3Health.Value; }; ((Character)humanoid).m_health = ConfigData._renegadeTier3Health.Value; ((Character)humanoid).m_damageModifiers = new DamageModifiers { m_blunt = (DamageModifier)0, m_slash = (DamageModifier)0, m_pierce = (DamageModifier)0, m_chop = (DamageModifier)3, m_pickaxe = (DamageModifier)3, m_fire = (DamageModifier)0, m_frost = (DamageModifier)0, m_lightning = (DamageModifier)0, m_spirit = (DamageModifier)3 }; ((Character)humanoid).m_staggerWhenBlocked = true; ((Character)humanoid).m_staggerDamageFactor = 0.4f; Humanoid obj = humanoid; ItemSet[] array = new ItemSet[2]; ItemSet val = new ItemSet(); val.m_items = (GameObject[])(object)new GameObject[4] { ObjectDB.instance.GetItemPrefab("HelmetIron"), ObjectDB.instance.GetItemPrefab("ArmorIronChest"), ObjectDB.instance.GetItemPrefab("ArmorIronLegs"), ObjectDB.instance.GetItemPrefab("CapeTrollHide") }; array[0] = val; val = new ItemSet(); val.m_items = (GameObject[])(object)new GameObject[4] { ObjectDB.instance.GetItemPrefab("HelmetRoot"), ObjectDB.instance.GetItemPrefab("ArmorRootChest"), ObjectDB.instance.GetItemPrefab("ArmorRootLegs"), ObjectDB.instance.GetItemPrefab("CapeTrollHide") }; array[1] = val; obj.m_randomSets = (ItemSet[])(object)array; } private static void SetMonsterAI(MonsterAI monsterAI, ZNetScene zNetScene) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_006e: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) ((BaseAI)monsterAI).m_viewRange = 40f; ((BaseAI)monsterAI).m_viewAngle = 90f; ((BaseAI)monsterAI).m_hearRange = 9999f; ((BaseAI)monsterAI).m_mistVision = false; ((BaseAI)monsterAI).m_alertedEffects.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_alerted"), m_enabled = true, m_variant = -1 } }; ((BaseAI)monsterAI).m_idleSound.m_effectPrefabs = (EffectData[])(object)new EffectData[1] { new EffectData { m_prefab = zNetScene.GetPrefab("sfx_dverger_vo_idle"), m_enabled = true, m_variant = 0 } }; ((BaseAI)monsterAI).m_idleSoundInterval = 10f; ((BaseAI)monsterAI).m_idleSoundChance = 0.5f; ((BaseAI)monsterAI).m_pathAgentType = (AgentType)1; ((BaseAI)monsterAI).m_moveMinAngle = 90f; ((BaseAI)monsterAI).m_smoothMovement = true; ((BaseAI)monsterAI).m_serpentMovement = false; ((BaseAI)monsterAI).m_jumpInterval = 0f; ((BaseAI)monsterAI).m_randomCircleInterval = 2f; ((BaseAI)monsterAI).m_randomMoveInterval = 10f; ((BaseAI)monsterAI).m_randomMoveRange = 10f; ((BaseAI)monsterAI).m_avoidFire = false; ((BaseAI)monsterAI).m_afraidOfFire = false; ((BaseAI)monsterAI).m_avoidWater = true; ((BaseAI)monsterAI).m_aggravatable = false; monsterAI.m_alertRange = 20f; monsterAI.m_fleeIfHurtWhenTargetCantBeReached = true; monsterAI.m_fleeIfNotAlerted = false; monsterAI.m_fleeIfLowHealth = 0f; monsterAI.m_circulateWhileCharging = true; monsterAI.m_enableHuntPlayer = false; monsterAI.m_attackPlayerObjects = true; monsterAI.m_privateAreaTriggerTreshold = 5; monsterAI.m_interceptTimeMax = 2f; monsterAI.m_interceptTimeMin = 0f; monsterAI.m_maxChaseDistance = 0f; monsterAI.m_minAttackInterval = 0f; monsterAI.m_circleTargetInterval = 5f; monsterAI.m_circleTargetDuration = 2f; monsterAI.m_circleTargetDistance = 5f; } private static void SetDropList(CharacterDrop characterDrop, ZNetScene zNetScene) { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //I