Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of MoreQuality v0.4.2
plugins/MoreQuality.dll
Decompiled 2 days 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.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.HallowedCauldron; using EntityStates.JellyfishMonster; using EntityStates.Mimic; using HarmonyLib; using ItemQualities; using ItemQualities.ContentManagement; using ItemQualities.Utilities.Extensions; using Microsoft.CodeAnalysis; using MoreQuality.Items; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.Items; using RoR2.Orbs; using RoR2.Projectile; using RoR2.UI; using SS2; using SS2.Components; using SS2.Equipments; using SS2.Items; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyVersion("0.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace MoreQuality { internal static class BaseText { private struct NameSource { public string BaseToken; public string ModifierToken; } private const string Marker = "[[BASE]]"; private static readonly Dictionary<string, string> baseTokens = new Dictionary<string, string>(); private static readonly Dictionary<string, NameSource> names = new Dictionary<string, NameSource>(); public static void Register() { Hooks.OnLoad("quality names", delegate { MapTokens(); RepairNames(); }); Run.onRunStartGlobal += delegate { RepairNames(); }; Language.onCurrentLanguageChanged += RepairNames; Hooks.Patch(typeof(Language), "GetLocalizedStringByToken", typeof(BaseText), null, "Substitute"); } private unsafe static void MapTokens() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_0170: Invalid comparison between Unknown and I4 //IL_00f6: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016a: 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) for (int i = 0; i < QualityCatalog.ItemQualityGroupCount; i++) { ItemQualityGroup itemQualityGroup = QualityCatalog.GetItemQualityGroup((ItemQualityGroupIndex)i); ItemDef itemDef = ItemCatalog.GetItemDef(itemQualityGroup.BaseItemIndex); if (!Object.op_Implicit((Object)(object)itemDef)) { continue; } for (QualityTier val = (QualityTier)0; (int)val < 4; val = (QualityTier)(val + 1)) { ItemDef itemDef2 = ItemCatalog.GetItemDef(itemQualityGroup.GetItemIndex(val)); if (Object.op_Implicit((Object)(object)itemDef2)) { Map(itemDef2.descriptionToken, itemDef.descriptionToken); Map(itemDef2.pickupToken, itemDef.pickupToken); MapName(itemDef2.nameToken, itemDef.nameToken, "QUALITY_" + ((object)(*(QualityTier*)(&val))/*cast due to .constrained prefix*/).ToString().ToUpper() + (itemDef2.isConsumed ? "_CONSUMED_MODIFIER" : "_MODIFIER")); } } } for (int j = 0; j < QualityCatalog.EquipmentQualityGroupCount; j++) { EquipmentQualityGroup equipmentQualityGroup = QualityCatalog.GetEquipmentQualityGroup((EquipmentQualityGroupIndex)j); EquipmentDef equipmentDef = EquipmentCatalog.GetEquipmentDef(equipmentQualityGroup.BaseEquipmentIndex); if (!Object.op_Implicit((Object)(object)equipmentDef)) { continue; } for (QualityTier val2 = (QualityTier)0; (int)val2 < 4; val2 = (QualityTier)(val2 + 1)) { EquipmentDef equipmentDef2 = EquipmentCatalog.GetEquipmentDef(equipmentQualityGroup.GetEquipmentIndex(val2)); if (Object.op_Implicit((Object)(object)equipmentDef2)) { Map(equipmentDef2.descriptionToken, equipmentDef.descriptionToken); Map(equipmentDef2.pickupToken, equipmentDef.pickupToken); MapName(equipmentDef2.nameToken, equipmentDef.nameToken, "QUALITY_" + ((object)(*(QualityTier*)(&val2))/*cast due to .constrained prefix*/).ToString().ToUpper() + "_MODIFIER"); } } } } private static void Map(string token, string baseToken) { if (!string.IsNullOrEmpty(token) && !string.IsNullOrEmpty(baseToken) && token != baseToken) { baseTokens[token] = baseToken; } } private static void MapName(string token, string baseToken, string modifierToken) { if (!string.IsNullOrEmpty(token) && !string.IsNullOrEmpty(baseToken) && token != baseToken) { names[token] = new NameSource { BaseToken = baseToken, ModifierToken = modifierToken }; } } private static void RepairNames() { try { Repair(); } catch (Exception ex) { MoreQualityPlugin.Log.LogError((object)("Repairing quality item names failed: " + ex)); } } private static void Repair() { Language currentLanguage = Language.currentLanguage; if (currentLanguage == null) { return; } int num = 0; foreach (KeyValuePair<string, NameSource> name in names) { string localizedStringByToken = currentLanguage.GetLocalizedStringByToken(name.Key); if (localizedStringByToken != null && localizedStringByToken.Contains(name.Value.BaseToken)) { string localizedStringByToken2 = currentLanguage.GetLocalizedStringByToken(name.Value.BaseToken); if (!(localizedStringByToken2 == name.Value.BaseToken)) { LanguageAPI.AddOverlay(name.Key, currentLanguage.GetLocalizedFormattedStringByToken(name.Value.ModifierToken, new object[1] { localizedStringByToken2 }), currentLanguage.name); num++; } } } if (num > 0) { MoreQualityPlugin.Log.LogInfo((object)("Repaired " + num + " quality item names for " + currentLanguage.name)); } } private static void Substitute(Language __instance, string token, ref string __result) { if (__result != null && __result.StartsWith("[[BASE]]") && baseTokens.TryGetValue(token, out var value)) { __result = __instance.GetLocalizedStringByToken(value) + __result.Substring("[[BASE]]".Length); } } } internal sealed class ContentProvider : IContentPackProvider { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static CollectContentPackProvidersDelegate <>9__4_0; internal void <Register>b__4_0(AddContentPackProviderDelegate add) { add.Invoke((IContentPackProvider)(object)new ContentProvider()); } } private static readonly List<Action<ContentPack>> builders = new List<Action<ContentPack>>(); private readonly ContentPack contentPack = new ContentPack(); public string identifier => "com.rewouh.MoreQuality"; public static void Register() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown object obj = <>c.<>9__4_0; if (obj == null) { CollectContentPackProvidersDelegate val = delegate(AddContentPackProviderDelegate add) { add.Invoke((IContentPackProvider)(object)new ContentProvider()); }; <>c.<>9__4_0 = val; obj = (object)val; } ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj; } public static void AddBuilder(Action<ContentPack> builder) { builders.Add(builder); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { IEnumerator wait = Starstorm.WaitUntilReady("MoreQuality content"); while (wait.MoveNext()) { yield return null; } foreach (Action<ContentPack> builder in builders) { try { builder(contentPack); } catch (Exception ex) { MoreQualityPlugin.Log.LogError((object)("Content builder failed: " + ex)); } } try { Visuals.Register(contentPack); } catch (Exception ex2) { MoreQualityPlugin.Log.LogError((object)("Effect registration failed: " + ex2)); } args.ReportProgress(1f); } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } internal static class CustomBuffs { private struct MarkState { public int Stacks; public float Until; } public static BuffDef BloodRush; public static BuffDef StimArmor; public static BuffDef StimSpeed; public static BuffDef StimDamage; public static BuffDef StimCrit; public static BuffDef StimRegen; public static BuffDef FieldAura; public static BuffDef InfernalFervor; public static BuffDef HexEmpowered; public static BuffDef Pinned; public static BuffDef Hunted; public static BuffDef Voodoo; public static BuffDef Slowed; public static BuffDef OnTheBeat; public static BuffDef Molten; public static BuffDef Overcharged; public static BuffDef GoldRush; public static BuffDef BloodOffering; public static BuffDef Wounded; public static BuffDef Enraged; public static BuffDef Crowned; public static BuffDef Reaped; public static BuffDef Hunger; public static BuffDef Phantom; public static BuffDef Drenched; private static readonly List<KeyValuePair<BuffDef, Func<BuffDef>>> icons = new List<KeyValuePair<BuffDef, Func<BuffDef>>>(); private static readonly Dictionary<KeyValuePair<CharacterBody, BuffDef>, MarkState> marks = new Dictionary<KeyValuePair<CharacterBody, BuffDef>, MarkState>(); public static void Register() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04ee: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Unknown result type (might be due to invalid IL or missing references) //IL_0647: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Unknown result type (might be due to invalid IL or missing references) //IL_06da: Unknown result type (might be due to invalid IL or missing references) //IL_06e4: Expected O, but got Unknown BloodRush = Create("bdQualitySS2BloodRush", new Color(0.9f, 0.25f, 0.3f), canStack: false, isDebuff: false, () => Buffs.BuffBloodTesterRegen ?? Buffs.CloakSpeed); StimArmor = Create("bdQualitySS2StimArmor", new Color(0.65f, 0.75f, 0.85f), canStack: false, isDebuff: false, () => Buffs.ArmorBoost); StimSpeed = Create("bdQualitySS2StimSpeed", new Color(0.4f, 0.85f, 1f), canStack: false, isDebuff: false, () => Buffs.WhipBoost); StimDamage = Create("bdQualitySS2StimDamage", new Color(1f, 0.5f, 0.2f), canStack: false, isDebuff: false, () => Buffs.PowerBuff); StimCrit = Create("bdQualitySS2StimCrit", new Color(1f, 0.85f, 0.3f), canStack: false, isDebuff: false, () => Buffs.FullCrit); StimRegen = Create("bdQualitySS2StimRegen", new Color(0.5f, 1f, 0.45f), canStack: false, isDebuff: false, () => Buffs.MedkitHeal); FieldAura = Create("bdQualitySS2FieldAura", new Color(0.9f, 0.55f, 0.1f), canStack: true, isDebuff: false, () => Buffs.AttackSpeedOnCrit); InfernalFervor = Create("bdMoreQualityInfernalFervor", new Color(0.85f, 0.2f, 0.45f), canStack: true, isDebuff: false, () => Buffs.WarCryBuff); HexEmpowered = Create("bdMoreQualityHexEmpowered", new Color(0.55f, 0.25f, 0.8f), canStack: true, isDebuff: false, () => Buffs.PowerBuff); Pinned = Create("bdMoreQualityPinned", new Color(0.75f, 0.75f, 0.8f), canStack: true, isDebuff: true, () => Buffs.Entangle); Hunted = Create("bdMoreQualityHunted", new Color(0.95f, 0.35f, 0.2f), canStack: true, isDebuff: true, () => Buffs.DeathMark); Voodoo = Create("bdMoreQualityVoodoo", new Color(0.6f, 0.2f, 0.55f), canStack: true, isDebuff: true, () => Buffs.LunarSecondaryRoot ?? Buffs.DeathMark); Slowed = Create("bdMoreQualitySlowed", new Color(0.45f, 0.6f, 0.95f), canStack: true, isDebuff: true, () => Buffs.Slow50); OnTheBeat = Create("bdMoreQualityOnTheBeat", new Color(1f, 0.9f, 0.4f), canStack: false, isDebuff: false, () => Buffs.FullCrit); Molten = Create("bdMoreQualityMolten", new Color(1f, 0.45f, 0.1f), canStack: true, isDebuff: false, () => Buffs.OnFire); Overcharged = Create("bdMoreQualityOvercharged", new Color(0.4f, 0.8f, 1f), canStack: false, isDebuff: false, () => Buffs.TeslaField ?? Buffs.PowerBuff); GoldRush = Create("bdMoreQualityGoldRush", new Color(1f, 0.8f, 0.2f), canStack: false, isDebuff: false, () => Buffs.CloakSpeed); BloodOffering = Create("bdMoreQualityBloodOffering", new Color(0.7f, 0.05f, 0.15f), canStack: true, isDebuff: false, () => Buffs.Bleeding); Wounded = Create("bdMoreQualityWounded", new Color(0.6f, 0.1f, 0.1f), canStack: true, isDebuff: true, () => Buffs.Bleeding); Enraged = Create("bdMoreQualityEnraged", new Color(1f, 0.15f, 0.1f), canStack: true, isDebuff: false, () => Buffs.WarCryBuff); Crowned = Create("bdMoreQualityCrowned", new Color(1f, 0.8f, 0.25f), canStack: true, isDebuff: false, () => Buffs.ArmorBoost); Reaped = Create("bdMoreQualityReaped", new Color(0.3f, 0.05f, 0.35f), canStack: false, isDebuff: true, () => Buffs.DeathMark); Hunger = Create("bdMoreQualityHunger", new Color(0.8f, 0.5f, 0.2f), canStack: true, isDebuff: false, () => Buffs.MedkitHeal, hidden: true); Phantom = Create("bdMoreQualityPhantom", new Color(0.6f, 0.6f, 0.7f), canStack: false, isDebuff: false, () => Buffs.Cloak, hidden: true); Drenched = Create("bdMoreQualityDrenched", new Color(0.55f, 0.1f, 0.15f), canStack: true, isDebuff: true, () => Buffs.Slow50); Hooks.OnLoad("buff icons", AssignIcons); RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(Stats); DamageHooks.AddIncoming(Vulnerable); Ticker.Every(0.2f, ExpireMarks); Run.onRunStartGlobal += delegate { marks.Clear(); }; } private static BuffDef Create(string name, Color color, bool canStack, bool isDebuff, Func<BuffDef> iconSource, bool hidden = false) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) BuffDef val = ScriptableObject.CreateInstance<BuffDef>(); ((Object)val).name = name; val.buffColor = color; val.canStack = canStack; val.isDebuff = isDebuff; val.isHidden = hidden; val.isCooldown = false; ContentAddition.AddBuffDef(val); icons.Add(new KeyValuePair<BuffDef, Func<BuffDef>>(val, iconSource)); return val; } private static void AssignIcons() { foreach (KeyValuePair<BuffDef, Func<BuffDef>> icon in icons) { try { BuffDef val = icon.Value(); if (Object.op_Implicit((Object)(object)val)) { icon.Key.iconSprite = val.iconSprite; } } catch (Exception ex) { MoreQualityPlugin.Log.LogWarning((object)("No icon for " + ((Object)icon.Key).name + ": " + ex.Message)); } } } private static void Stats(CharacterBody body, StatHookEventArgs args) { if (body.HasBuff(StimArmor)) { args.armorAdd += 30f; } if (body.HasBuff(StimSpeed)) { args.moveSpeedMultAdd += 0.3f; } if (body.HasBuff(StimDamage)) { args.damageMultAdd += 0.25f; } if (body.HasBuff(StimCrit)) { args.critAdd += 20f; } if (body.HasBuff(StimRegen)) { args.baseRegenAdd += 10f; } float num = (float)body.GetBuffCount(InfernalFervor) / 100f; args.damageMultAdd += num; args.attackSpeedMultAdd += num; float num2 = (float)body.GetBuffCount(HexEmpowered) / 100f; args.damageMultAdd += num2; args.moveSpeedMultAdd += num2; if (body.HasBuff(Pinned)) { args.moveSpeedRootCount++; } args.moveSpeedReductionMultAdd += (float)Mathf.Min(body.GetBuffCount(Slowed), 90) / 100f; float num3 = (float)body.GetBuffCount(Enraged) / 100f; args.attackSpeedMultAdd += num3; args.damageMultAdd += num3; float num4 = (float)body.GetBuffCount(Crowned) / 100f; args.healthMultAdd += num4; args.damageMultAdd += num4 / 2f; } private static void Vulnerable(HealthComponent victim, DamageInfo damageInfo, CharacterBody attacker) { CharacterBody body = victim.body; if (Object.op_Implicit((Object)(object)body)) { int num = body.GetBuffCount(Pinned) + body.GetBuffCount(Hunted); if (num > 0) { damageInfo.damage *= 1f + (float)num / 100f; } } } public static void Mark(CharacterBody body, BuffDef buff, int stacks, float duration) { //IL_008e: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active && Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)buff) && stacks > 0) { KeyValuePair<CharacterBody, BuffDef> key = new KeyValuePair<CharacterBody, BuffDef>(body, buff); float fixedTime = Time.fixedTime; if (marks.TryGetValue(key, out var value) && value.Until >= fixedTime) { stacks = Mathf.Max(stacks, value.Stacks); } marks[key] = new MarkState { Stacks = stacks, Until = Mathf.Max(fixedTime + duration, value.Until) }; if (body.GetBuffCount(buff) != stacks) { body.SetBuffCount(buff.buffIndex, stacks); } } } private static void ExpireMarks() { //IL_0098: Unknown result type (might be due to invalid IL or missing references) float now = Time.fixedTime; foreach (KeyValuePair<KeyValuePair<CharacterBody, BuffDef>, MarkState> item in marks.Where((KeyValuePair<KeyValuePair<CharacterBody, BuffDef>, MarkState> e) => !Object.op_Implicit((Object)(object)e.Key.Key) || e.Value.Until < now).ToList()) { marks.Remove(item.Key); if (Object.op_Implicit((Object)(object)item.Key.Key)) { item.Key.Key.SetBuffCount(item.Key.Value.buffIndex, 0); } } } } internal static class DamageHooks { public delegate void Modifier(HealthComponent victim, DamageInfo damageInfo, CharacterBody attacker); private static readonly List<Modifier> modifiers = new List<Modifier>(); private static readonly List<Modifier> incoming = new List<Modifier>(); private static bool patched; public static void Add(Modifier modifier) { modifiers.Add(modifier); Patch(); } public static void AddIncoming(Modifier modifier) { incoming.Add(modifier); Patch(); } private static void Patch() { if (!patched) { patched = true; Hooks.Patch(typeof(HealthComponent), "TakeDamage", typeof(DamageHooks), "TakeDamage", null, new Type[1] { typeof(DamageInfo) }); } } private static void TakeDamage(HealthComponent __instance, DamageInfo damageInfo) { if (damageInfo == null || damageInfo.rejected) { return; } CharacterBody val = (Object.op_Implicit((Object)(object)damageInfo.attacker) ? damageInfo.attacker.GetComponent<CharacterBody>() : null); foreach (Modifier item in incoming) { try { item(__instance, damageInfo, val); } catch (Exception ex) { MoreQualityPlugin.Log.LogError((object)ex); } } if (!Object.op_Implicit((Object)(object)val)) { return; } foreach (Modifier modifier in modifiers) { try { modifier(__instance, damageInfo, val); } catch (Exception ex2) { MoreQualityPlugin.Log.LogError((object)ex2); } } } } internal static class Decor { private sealed class Message : INetMessage, ISerializableObject { public NetworkInstanceId Target; public NetworkInstanceId OnlyFor = NetworkInstanceId.Invalid; public float Scale; public int[] Items = new int[0]; public void Serialize(NetworkWriter writer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) writer.Write(Target); writer.Write(OnlyFor); writer.Write(Scale); writer.Write(Items.Length); int[] items = Items; foreach (int num in items) { writer.Write(num); } } public void Deserialize(NetworkReader reader) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) Target = reader.ReadNetworkId(); OnlyFor = reader.ReadNetworkId(); Scale = reader.ReadSingle(); int num = reader.ReadInt32(); Items = new int[Mathf.Clamp(num, 0, 32)]; for (int i = 0; i < Items.Length; i++) { Items[i] = reader.ReadInt32(); } } public void OnReceived() { if (!NetworkServer.active) { ApplyWhenSpawned(this, 60); } } } private sealed class Position : INetMessage, ISerializableObject { public NetworkInstanceId Target; public Vector3 Where; public void Serialize(NetworkWriter writer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) writer.Write(Target); writer.Write(Where); } public void Deserialize(NetworkReader reader) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) Target = reader.ReadNetworkId(); Where = reader.ReadVector3(); } public void OnReceived() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { GameObject val = Util.FindNetworkObject(Target); Follower follower = (Object.op_Implicit((Object)(object)val) ? val.GetComponent<Follower>() : null); if (Object.op_Implicit((Object)(object)follower)) { follower.target = Where; } } } } internal sealed class Follower : MonoBehaviour { public Vector3 target; public float nextSend; private bool started; private void Update() { //IL_0035: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { if (!started) { target = ((Component)this).transform.position; started = true; } else { ((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, target, 1f - Mathf.Exp(-15f * Time.deltaTime)); } } } } private sealed class Decorated : MonoBehaviour { public Vector3 baseScale; public Transform model; public GameObject icons; } internal sealed class Billboard : MonoBehaviour { private void LateUpdate() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) Camera main = Camera.main; if (Object.op_Implicit((Object)(object)main)) { ((Component)this).transform.rotation = ((Component)main).transform.rotation; } } } private const float IconSize = 0.9f; public static void Register() { NetworkingAPI.RegisterMessageType<Message>(); NetworkingAPI.RegisterMessageType<Position>(); } public static void Decorate(GameObject target, float scale, IEnumerable<ItemIndex> items, GameObject onlyFor = null) { //IL_0072: 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_007f: 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_00a8: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)target) && NetworkServer.active) { Message message = new Message { Scale = scale, Items = (items ?? Enumerable.Empty<ItemIndex>()).Select((ItemIndex i) => (int)i).Take(32).ToArray(), OnlyFor = ((Object.op_Implicit((Object)(object)onlyFor) && Object.op_Implicit((Object)(object)onlyFor.GetComponent<NetworkIdentity>())) ? onlyFor.GetComponent<NetworkIdentity>().netId : NetworkInstanceId.Invalid) }; Apply(target, message); NetworkIdentity component = target.GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component)) { message.Target = component.netId; NetMessageExtensions.Send((INetMessage)(object)message, (NetworkDestination)1); } } } public static void Move(GameObject target, Vector3 position) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_0082: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)target) || !NetworkServer.active) { return; } target.transform.position = position; Follower component = target.GetComponent<Follower>(); if (Object.op_Implicit((Object)(object)component)) { component.target = position; } NetworkIdentity component2 = target.GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component2) && (!Object.op_Implicit((Object)(object)component) || Time.time >= component.nextSend)) { if (Object.op_Implicit((Object)(object)component)) { component.nextSend = Time.time + 0.05f; } NetMessageExtensions.Send((INetMessage)(object)new Position { Target = component2.netId, Where = position }, (NetworkDestination)1); } } private static void ApplyWhenSpawned(Message message, int triesLeft) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) GameObject val = Util.FindNetworkObject(message.Target); if (Object.op_Implicit((Object)(object)val)) { Apply(val, message); } else if (triesLeft > 0) { RoR2Application.onNextUpdate += delegate { ApplyWhenSpawned(message, triesLeft - 1); }; } } private static void Apply(GameObject target, Message message) { //IL_00c8: 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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019d: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: 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_0203: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: 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_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0251: 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_026a: Unknown result type (might be due to invalid IL or missing references) Decorated decorated = target.GetComponent<Decorated>() ?? target.AddComponent<Decorated>(); CharacterBody component = target.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)decorated.model)) { ModelLocator val = (Object.op_Implicit((Object)(object)component) ? component.modelLocator : null); decorated.model = ((!Object.op_Implicit((Object)(object)val)) ? (Object.op_Implicit((Object)(object)component) ? null : target.transform) : (Object.op_Implicit((Object)(object)val.modelBaseTransform) ? val.modelBaseTransform : val.modelTransform)); if (Object.op_Implicit((Object)(object)decorated.model)) { decorated.baseScale = decorated.model.localScale; } } if (Object.op_Implicit((Object)(object)decorated.model) && message.Scale > 0f) { decorated.model.localScale = decorated.baseScale * message.Scale; } if (message.OnlyFor != NetworkInstanceId.Invalid && !SeenHere(message.OnlyFor)) { Transform val2 = ((Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelLocator)) ? component.modelLocator.modelTransform : null); if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.SetActive(false); } } if (Object.op_Implicit((Object)(object)decorated.icons)) { Object.Destroy((Object)(object)decorated.icons); } if (message.Items.Length == 0) { return; } decorated.icons = new GameObject("MoreQualityIcons"); decorated.icons.transform.SetParent(target.transform, false); float num = (Object.op_Implicit((Object)(object)component) ? (component.radius * 1.6f + 1f) : 1.2f); decorated.icons.transform.localPosition = Vector3.up * num; for (int i = 0; i < message.Items.Length; i++) { ItemDef itemDef = ItemCatalog.GetItemDef((ItemIndex)message.Items[i]); if (Object.op_Implicit((Object)(object)itemDef) && Object.op_Implicit((Object)(object)itemDef.pickupIconSprite)) { GameObject val3 = new GameObject("Icon"); val3.transform.SetParent(decorated.icons.transform, false); val3.transform.localPosition = Vector3.right * ((float)i - (float)(message.Items.Length - 1) / 2f) * 0.9f; val3.transform.localScale = Vector3.one * 0.9f / Mathf.Max(0.01f, target.transform.lossyScale.x); val3.AddComponent<SpriteRenderer>().sprite = itemDef.pickupIconSprite; val3.AddComponent<Billboard>(); } } } private static bool SeenHere(NetworkInstanceId bodyId) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { CharacterBody cachedBody = readOnlyLocalUsers.cachedBody; NetworkIdentity val = (Object.op_Implicit((Object)(object)cachedBody) ? ((Component)cachedBody).GetComponent<NetworkIdentity>() : null); if (Object.op_Implicit((Object)(object)val) && val.netId == bodyId) { return true; } } return false; } } internal static class Enemies { public static IEnumerable<HealthComponent> Near(Vector3 position, float radius, TeamIndex team, HealthComponent exclude = null) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) BullseyeSearch val = new BullseyeSearch { searchOrigin = position, searchDirection = Vector3.zero, maxDistanceFilter = radius, teamMaskFilter = TeamMask.GetEnemyTeams(team), filterByLoS = false, sortMode = (SortMode)1 }; val.RefreshCandidates(); return (from h in val.GetResults() where Object.op_Implicit((Object)(object)h) && Object.op_Implicit((Object)(object)h.healthComponent) && h.healthComponent.alive && (Object)(object)h.healthComponent != (Object)(object)exclude && Object.op_Implicit((Object)(object)h.healthComponent.body) select h.healthComponent).Distinct().ToList(); } public static List<HealthComponent> All(TeamIndex team) { //IL_0007: 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_00a5: Invalid comparison between Unknown and I4 //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) List<HealthComponent> list = new List<HealthComponent>(); TeamIndex val = (TeamIndex)0; while ((int)val < 6) { if (val != team) { TeamMask enemyTeams = TeamMask.GetEnemyTeams(team); if (((TeamMask)(ref enemyTeams)).HasTeam(val)) { foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers(val)) { if (Object.op_Implicit((Object)(object)teamMember) && Object.op_Implicit((Object)(object)teamMember.body) && Object.op_Implicit((Object)(object)teamMember.body.healthComponent) && teamMember.body.healthComponent.alive) { list.Add(teamMember.body.healthComponent); } } } } val = (TeamIndex)(sbyte)(val + 1); } return list; } } internal static class EquipmentMemory { public sealed class Use { public EquipmentDef equipment; public QualityTier tier; public float time; public bool spent; public float firstHit = -1f; } private static readonly ConditionalWeakTable<CharacterBody, Use> uses = new ConditionalWeakTable<CharacterBody, Use>(); public static void Remember(CharacterBody body, EquipmentDef equipment, QualityTier tier) { //IL_0028: 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) if (Object.op_Implicit((Object)(object)body)) { uses.Remove(body); uses.Add(body, new Use { equipment = equipment, tier = tier, time = Time.fixedTime }); } } public static Use Recent(CharacterBody body, EquipmentDef equipment, float window) { if (!Object.op_Implicit((Object)(object)body) || !uses.TryGetValue(body, out var value) || (Object)(object)value.equipment != (Object)(object)equipment || Time.fixedTime - value.time > window) { return null; } return value; } } internal static class Fx { public static GameObject MetronomeTick; public static GameObject Ignite; public static GameObject ChocolateEaten; public static GameObject BloodWave; public static GameObject PoisonZone; public static GameObject Meltdown; public static GameObject SelfDestruct; public static GameObject BannerSlam; public static GameObject Stomp; public static GameObject SpiritBurst; public static GameObject CoinBurst; public static GameObject MoltenCoin; public static GameObject Chocolate; private static readonly Color Gold = new Color(1f, 0.8f, 0.25f); private static readonly Color Fire = new Color(1f, 0.45f, 0.08f); private static readonly Color Ember = new Color(1f, 0.75f, 0.3f); private static readonly Color Blood = new Color(0.75f, 0.02f, 0.08f); private static readonly Color Cocoa = new Color(0.35f, 0.18f, 0.08f); private static readonly Color Mint = new Color(0.3f, 0.85f, 0.45f); internal static void Register() { ContentProvider.AddBuilder(Build); } private static void Build(ContentPack pack) { //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) MetronomeTick = Visuals.Effect("MoreQualityMetronomeTick", 1f, "Play_UI_menuClick", delegate(Transform root) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_00cb: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Pulse", new Visuals.Spec { Color = Gold, Size = 0.2f, Lifetime = 0.35f, Speed = 3f, Burst = 36, Shape = (ParticleSystemShapeType)10, Radius = 0.3f, Shell = true, Shrink = true, Rotation = new Vector3(90f, 0f, 0f) }); Visuals.Particles(root, "Flash", new Visuals.Spec { Color = Gold, Size = 1.2f, Lifetime = 0.15f, Burst = 1, Shape = (ParticleSystemShapeType)0, Radius = 0.01f, Local = true }); }, follow: true); Ignite = Visuals.Effect("MoreQualityIgnite", 1.5f, null, delegate(Transform root) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_00c0: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Flames", new Visuals.Spec { Color = Fire, Size = 0.5f, Lifetime = 0.5f, Speed = 1.5f, Burst = 10, Shape = (ParticleSystemShapeType)0, Radius = 0.4f, Gravity = -0.3f, Shrink = true }); Visuals.Particles(root, "Embers", new Visuals.Spec { Color = Ember, Size = 0.08f, Lifetime = 0.9f, Speed = 2.5f, Burst = 12, Shape = (ParticleSystemShapeType)0, Radius = 0.3f, Gravity = -0.2f }); }); ChocolateEaten = Visuals.Effect("MoreQualityChocolateEaten", 2f, "Play_item_proc_bandolierPickup", delegate(Transform root) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_00c1: 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_00f8: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Crumbs", new Visuals.Spec { Color = Cocoa, Size = 0.15f, Lifetime = 0.8f, Speed = 4f, Burst = 25, Shape = (ParticleSystemShapeType)0, Radius = 0.2f, Gravity = 1f, Shrink = true }); Visuals.Particles(root, "Ring", new Visuals.Spec { Color = Mint, Size = 0.35f, Lifetime = 0.6f, Speed = 1.5f, Burst = 50, Shape = (ParticleSystemShapeType)10, Radius = 0.1f, Shell = true, Shrink = true, Rotation = new Vector3(90f, 0f, 0f) }); }); BloodWave = Visuals.Effect("MoreQualityBloodWave", 4f, "Play_bleedOnCritAndExplode_explode", delegate(Transform root) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_00b3: 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0160: 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_0198: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: 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_025d: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: 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_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) Vector3 rotation = default(Vector3); ((Vector3)(ref rotation))..ctor(90f, 0f, 0f); Visuals.Flash(root, new Color(1f, 0.1f, 0.1f), 1.5f, 6f, 0.5f); Visuals.Particles(root, "Core", new Visuals.Spec { Material = Visuals.Kind.Glow, Color = new Color(1f, 0.2f, 0.15f), ColorEnd = new Color(0.4f, 0f, 0f), Size = 2f, Lifetime = 0.3f, Burst = 2, Shape = (ParticleSystemShapeType)0, Radius = 0.01f, Local = true, Grow = true }); Visuals.Particles(root, "Wave", new Visuals.Spec { Material = Visuals.Kind.Blood, Color = new Color(0.85f, 0.05f, 0.08f), ColorEnd = new Color(0.25f, 0f, 0.02f), Size = 0.55f, Lifetime = 0.55f, Speed = 2f, Burst = 140, Shape = (ParticleSystemShapeType)10, Radius = 0.08f, Shell = true, Flat = true, Spin = true, Drag = 0.15f, Rotation = rotation }); Visuals.Particles(root, "WaveCrest", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.6f, 0.02f, 0.05f), ColorEnd = new Color(0.15f, 0f, 0f), Size = 0.45f, Lifetime = 0.6f, Speed = 1.9f, Burst = 70, Shape = (ParticleSystemShapeType)10, Radius = 0.08f, Shell = true, Grow = true, Spin = true, Drag = 0.2f, Rotation = rotation }); Visuals.Particles(root, "Streaks", new Visuals.Spec { Material = Visuals.Kind.Spark, Color = new Color(0.95f, 0.1f, 0.12f), ColorEnd = new Color(0.35f, 0f, 0.02f), Size = 0.1f, Lifetime = 0.9f, Speed = 2.6f, Burst = 60, Shape = (ParticleSystemShapeType)2, Radius = 0.2f, Gravity = 1.6f, Stretch = true, Rotation = new Vector3(-90f, 0f, 0f) }); Visuals.Particles(root, "Droplets", new Visuals.Spec { Material = Visuals.Kind.Blood, Color = new Color(0.7f, 0.02f, 0.05f), Size = 0.14f, Lifetime = 1.2f, Speed = 1.5f, Burst = 45, Shape = (ParticleSystemShapeType)2, Radius = 0.3f, Gravity = 1.2f, Shrink = true, Spin = true, Rotation = new Vector3(-90f, 0f, 0f) }); Visuals.Particles(root, "Splats", new Visuals.Spec { Material = Visuals.Kind.Blood, Color = new Color(0.45f, 0f, 0.03f), ColorEnd = new Color(0.2f, 0f, 0.01f), Size = 0.5f, Lifetime = 3.5f, Burst = 28, Shape = (ParticleSystemShapeType)10, Radius = 0.9f, Flat = true, Spin = true, Grow = true, Rotation = rotation }); Visuals.Particles(root, "Mist", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.45f, 0f, 0.05f), ColorEnd = new Color(0.1f, 0f, 0f), Size = 0.9f, Lifetime = 2f, Speed = 0.5f, Burst = 22, Shape = (ParticleSystemShapeType)10, Radius = 0.6f, Gravity = -0.03f, Grow = true, Spin = true, Noise = 0.3f, Drag = 0.3f, Rotation = rotation }); }); PoisonZone = Visuals.Effect("MoreQualityPoisonZone", 30f, null, delegate(Transform root) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: 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_00c4: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0127: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: 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_01f9: 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_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) Vector3 rotation = default(Vector3); ((Vector3)(ref rotation))..ctor(90f, 0f, 0f); Color color = default(Color); ((Color)(ref color))..ctor(0.5f, 0.9f, 0.15f); Visuals.Flash(root, color, 1.3f, 2.5f, 0f); Visuals.Particles(root, "Burst", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.6f, 1f, 0.25f), ColorEnd = new Color(0.2f, 0.4f, 0.05f), Size = 0.7f, Lifetime = 0.8f, Speed = 1.5f, Burst = 30, Shape = (ParticleSystemShapeType)10, Radius = 0.1f, Grow = true, Spin = true, Drag = 0.5f, Rotation = rotation }); Visuals.Particles(root, "Fog", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.4f, 0.75f, 0.1f), ColorEnd = new Color(0.15f, 0.35f, 0.05f), Size = 0.9f, Lifetime = 2.6f, Rate = 22f, Speed = 0.08f, Shape = (ParticleSystemShapeType)10, Radius = 0.85f, Gravity = -0.015f, Grow = true, Spin = true, Noise = 0.25f, Rotation = rotation }); Visuals.Particles(root, "Stain", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.25f, 0.5f, 0.05f), Size = 1.4f, Lifetime = 3f, Rate = 6f, Shape = (ParticleSystemShapeType)10, Radius = 0.7f, Flat = true, Spin = true, Rotation = rotation }); Visuals.Particles(root, "Bubbles", new Visuals.Spec { Material = Visuals.Kind.Glow, Color = new Color(0.8f, 1f, 0.35f), ColorEnd = new Color(0.4f, 0.8f, 0.1f), Size = 0.12f, Lifetime = 1.3f, Rate = 26f, Speed = 0.1f, Shape = (ParticleSystemShapeType)10, Radius = 0.9f, Gravity = -0.12f, Shrink = true, Noise = 0.15f, Rotation = rotation }); Visuals.Particles(root, "Wisps", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.55f, 0.9f, 0.2f), ColorEnd = new Color(0.1f, 0.25f, 0f), Size = 0.35f, Lifetime = 1.6f, Rate = 20f, Speed = 0.25f, Shape = (ParticleSystemShapeType)10, Radius = 1f, Shell = true, Gravity = -0.06f, Grow = true, Spin = true, Noise = 0.4f, Rotation = rotation }); ((Component)root).gameObject.AddComponent<Visuals.TimedZone>(); }); Meltdown = Visuals.Shockwave("MoreQualityMeltdown", new Color(1f, 0.85f, 0.2f), new Color(0.6f, 1f, 0.3f), "Play_alloyHunter_spawn_04_explosion"); SelfDestruct = Visuals.Shockwave("MoreQualitySelfDestruct", new Color(0.35f, 0.8f, 1f), Ember, "Play_defectiveUnit_attack_melee_explosion"); BannerSlam = Visuals.Shockwave("MoreQualityBannerSlam", Gold, new Color(0.8f, 0.65f, 0.45f), null); Stomp = Visuals.Shockwave("MoreQualityStomp", new Color(0.5f, 1f, 0.3f), new Color(0.7f, 0.9f, 0.5f), null); SpiritBurst = Visuals.Shockwave("MoreQualitySpiritBurst", new Color(0.4f, 1f, 0.85f), new Color(0.75f, 0.45f, 1f), null); CoinBurst = Visuals.Effect("MoreQualityCoinBurst", 1.5f, "Play_UI_coin", delegate(Transform root) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Sparkles", new Visuals.Spec { Color = Gold, Size = 0.15f, Lifetime = 0.7f, Speed = 3f, Burst = 15, Shape = (ParticleSystemShapeType)0, Radius = 0.2f, Gravity = 0.5f, Shrink = true }); }); MoltenCoin = Pickup(pack, "Prefabs/NetworkedObjects/BonusMoneyPack", "MoreQualityMoltenCoin", delegate(Transform visual) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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_0059: 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_0079: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) Material material = Visuals.Solid(new Color(1f, 0.55f, 0.15f), Fire, 2.5f); Visuals.Model(visual, (PrimitiveType)2, Vector3.zero, new Vector3(0.7f, 0.06f, 0.7f), material).transform.localEulerAngles = new Vector3(90f, 0f, 0f); Visuals.Model(visual, (PrimitiveType)2, Vector3.zero, new Vector3(0.45f, 0.08f, 0.45f), Visuals.Solid(new Color(1f, 0.85f, 0.3f), Ember, 3f)).transform.localEulerAngles = new Vector3(90f, 0f, 0f); Visuals.Particles(visual, "Flames", new Visuals.Spec { Color = Fire, Size = 0.35f, Lifetime = 0.5f, Rate = 25f, Speed = 0.6f, Shape = (ParticleSystemShapeType)0, Radius = 0.3f, Gravity = -0.4f, Shrink = true }); Visuals.Particles(visual, "Embers", new Visuals.Spec { Color = Ember, Size = 0.06f, Lifetime = 1f, Rate = 12f, Speed = 0.8f, Shape = (ParticleSystemShapeType)0, Radius = 0.3f, Gravity = -0.2f }); }); Chocolate = Pickup(pack, "Prefabs/NetworkedObjects/HealPack", "MoreQualityChocolate", delegate(Transform visual) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) Visuals.Model(visual, (PrimitiveType)3, new Vector3(0.12f, 0f, 0f), new Vector3(0.36f, 0.12f, 0.5f), Visuals.Solid(Cocoa, Color.black, 0f)); Visuals.Model(visual, (PrimitiveType)3, new Vector3(-0.18f, 0f, 0f), new Vector3(0.3f, 0.15f, 0.53f), Visuals.Solid(Mint, Mint, 0.6f)); Visuals.Particles(visual, "Sparkle", new Visuals.Spec { Color = Mint, Size = 0.1f, Lifetime = 0.8f, Rate = 8f, Speed = 0.3f, Shape = (ParticleSystemShapeType)0, Radius = 0.4f, Shrink = true }); }); Marks(); } private static GameObject Pickup(ContentPack pack, string source, string name, Action<Transform> build) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) GameObject val = LegacyResourcesAPI.Load<GameObject>(source); if (!Object.op_Implicit((Object)(object)val)) { return null; } GameObject val2 = PrefabAPI.InstantiateClone(val, name, true); Renderer[] componentsInChildren = val2.GetComponentsInChildren<Renderer>(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].enabled = false; } ParticleSystem[] componentsInChildren2 = val2.GetComponentsInChildren<ParticleSystem>(true); for (int i = 0; i < componentsInChildren2.Length; i++) { EmissionModule emission = componentsInChildren2[i].emission; ((EmissionModule)(ref emission)).enabled = false; } Light[] componentsInChildren3 = val2.GetComponentsInChildren<Light>(true); for (int i = 0; i < componentsInChildren3.Length; i++) { ((Behaviour)componentsInChildren3[i]).enabled = false; } Transform transform = new GameObject("MoreQualityVisual").transform; transform.SetParent(val2.transform, false); build(transform); ((Component)transform).gameObject.AddComponent<Visuals.Spinner>(); pack.networkedObjectPrefabs.Add((GameObject[])(object)new GameObject[1] { val2 }); return val2; } private static void Marks() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) Vector3 flat = new Vector3(90f, 0f, 0f); BuffVisuals.Show(CustomBuffs.Molten, Visuals.Template("MoreQualityMoltenAura", delegate(Transform root) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_0102: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Ring", new Visuals.Spec { Color = Fire, Size = 0.18f, Lifetime = 0.6f, Rate = 80f, Speed = 0.2f, Shape = (ParticleSystemShapeType)10, Radius = 1f, Shell = true, Gravity = -0.15f, Shrink = true, Rotation = flat }); Visuals.Particles(root, "Embers", new Visuals.Spec { Color = Ember, Size = 0.05f, Lifetime = 1.2f, Rate = 30f, Speed = 0.15f, Shape = (ParticleSystemShapeType)10, Radius = 1f, Gravity = -0.08f, Rotation = flat }); }), (CharacterBody body) => MoreQuality.Items.MoltenCoin.AuraRadiusFor(body), atFeet: true); BuffVisuals.Show(CustomBuffs.Pinned, Visuals.Template("MoreQualityPinnedMark", delegate(Transform root) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0086: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Pins", new Visuals.Spec { Color = new Color(0.85f, 0.85f, 0.95f), Size = 0.12f, Lifetime = 0.4f, Rate = 30f, Speed = 0.1f, Shape = (ParticleSystemShapeType)10, Radius = 1f, Shell = true, Local = true, Rotation = flat }); }), (CharacterBody body) => body.radius * 1.2f, atFeet: true); BuffVisuals.Show(CustomBuffs.Hunted, Visuals.Template("MoreQualityHuntedMark", delegate(Transform root) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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) Visuals.Particles(root, "Ring", new Visuals.Spec { Color = new Color(1f, 0.25f, 0.1f), Size = 0.15f, Lifetime = 0.5f, Rate = 35f, Shape = (ParticleSystemShapeType)10, Radius = 1f, Shell = true, Local = true, Rotation = flat }); Visuals.Particles(root, "Rise", new Visuals.Spec { Color = new Color(1f, 0.4f, 0.2f), Size = 0.08f, Lifetime = 0.8f, Rate = 10f, Speed = 1f, Shape = (ParticleSystemShapeType)10, Radius = 0.8f, Gravity = -0.1f, Rotation = flat }); }), (CharacterBody body) => body.radius * 1.4f, atFeet: true); BuffVisuals.Show(CustomBuffs.Voodoo, Visuals.Template("MoreQualityVoodooMark", delegate(Transform root) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Swirl", new Visuals.Spec { Color = new Color(0.65f, 0.2f, 0.75f), Size = 0.12f, Lifetime = 0.9f, Rate = 14f, Speed = 0.3f, Shape = (ParticleSystemShapeType)0, Radius = 1f, Shell = true, Local = true, Shrink = true }); }), (CharacterBody body) => body.radius, atFeet: false); BuffVisuals.Show(CustomBuffs.Slowed, Visuals.Template("MoreQualitySlowedMark", delegate(Transform root) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Dust", new Visuals.Spec { Color = new Color(0.45f, 0.65f, 1f), Size = 0.15f, Lifetime = 0.6f, Rate = 12f, Speed = 0.1f, Shape = (ParticleSystemShapeType)10, Radius = 1f, Gravity = 0.1f, Rotation = flat }); }), (CharacterBody body) => body.radius, atFeet: true); BuffVisuals.Show(CustomBuffs.Overcharged, Visuals.Template("MoreQualityOverchargedMark", delegate(Transform root) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Sparks", new Visuals.Spec { Color = new Color(0.4f, 0.85f, 1f), Size = 0.07f, Lifetime = 0.3f, Rate = 40f, Speed = 2f, Shape = (ParticleSystemShapeType)0, Radius = 1f, Shell = true, Shrink = true }); }), (CharacterBody body) => body.radius, atFeet: false); BuffVisuals.Show(CustomBuffs.GoldRush, Visuals.Template("MoreQualityGoldRushMark", delegate(Transform root) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Glitter", new Visuals.Spec { Color = Gold, Size = 0.08f, Lifetime = 0.8f, Rate = 20f, Speed = 0.4f, Shape = (ParticleSystemShapeType)0, Radius = 1f, Gravity = 0.2f, Shrink = true }); }), (CharacterBody body) => body.radius * 1.3f, atFeet: false); BuffVisuals.Show(CustomBuffs.BloodOffering, Visuals.Template("MoreQualityBloodOfferingMark", delegate(Transform root) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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) Visuals.Particles(root, "Drips", new Visuals.Spec { Color = Blood, Size = 0.09f, Lifetime = 0.9f, Rate = 14f, Speed = 0.1f, Shape = (ParticleSystemShapeType)0, Radius = 1f, Gravity = 0.5f, Shrink = true }); Visuals.Particles(root, "Orbit", new Visuals.Spec { Color = new Color(0.55f, 0f, 0.05f), Size = 0.2f, Lifetime = 0.6f, Rate = 10f, Shape = (ParticleSystemShapeType)10, Radius = 1.1f, Shell = true, Local = true, Rotation = flat }); }), (CharacterBody body) => body.radius * (1f + (float)body.GetBuffCount(CustomBuffs.BloodOffering) / 150f), atFeet: false); BuffVisuals.Show(CustomBuffs.Wounded, Visuals.Template("MoreQualityWoundedMark", delegate(Transform root) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Bleed", new Visuals.Spec { Color = new Color(0.6f, 0.05f, 0.05f), Size = 0.1f, Lifetime = 0.7f, Rate = 10f, Speed = 0.2f, Shape = (ParticleSystemShapeType)0, Radius = 0.8f, Gravity = 0.6f, Shrink = true }); }), (CharacterBody body) => body.radius, atFeet: false); } } internal static class Dlc { public static QualityTier TeamHighest(ItemDef item) { //IL_0001: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_0042: Unknown result type (might be due to invalid IL or missing references) QualityTier val = (QualityTier)(-1); foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.master)) { QualityTier val2 = Q.Highest(Q.Counts(instance.master, item)); if (val2 > val) { val = val2; } } } return val; } public static ItemQualityCounts TeamBest(ItemDef item) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) ItemQualityCounts val = ItemQualityCounts.zero; foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.master)) { ItemQualityCounts val2 = Q.Counts(instance.master, item); if (Q.Highest(val2) > Q.Highest(val)) { val = val2; } } } return val; } public static CharacterBody TeamHolder(ItemDef item, QualityTier tier) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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) foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances) { if (Object.op_Implicit((Object)(object)instance) && Object.op_Implicit((Object)(object)instance.master) && Q.Highest(Q.Counts(instance.master, item)) == tier) { return instance.master.GetBody(); } } return null; } public static ItemDef Variant(ItemDef baseItem, QualityTier tier) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) ItemQualityGroup val = QualityContent.Group(baseItem); if (!((Object)(object)val != (Object)null)) { return null; } return ItemCatalog.GetItemDef(val.GetItemIndex(tier)); } public static int Permanent(Inventory inventory, ItemDef baseItem, QualityTier tier) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) ItemDef val = Variant(baseItem, tier); if (!Object.op_Implicit((Object)(object)inventory) || !Object.op_Implicit((Object)(object)val)) { return 0; } return inventory.GetItemCountPermanent(val); } public static int Convert(Inventory inventory, ItemDef from, ItemDef to, QualityTier tier, int count) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) ItemDef val = Variant(from, tier); ItemDef val2 = Variant(to, tier); if (!Object.op_Implicit((Object)(object)inventory) || !Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)val2)) { return 0; } count = Math.Min(count, inventory.GetItemCountPermanent(val)); if (count <= 0) { return 0; } inventory.RemoveItemPermanent(val, count); inventory.GiveItemPermanent(val2, count); return count; } public static QualityTier LowestPermanent(Inventory inventory, ItemDef baseItem) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Invalid comparison between Unknown and I4 //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) for (QualityTier val = (QualityTier)0; (int)val < 4; val = (QualityTier)(val + 1)) { if (Permanent(inventory, baseItem, val) > 0) { return val; } } return (QualityTier)(-1); } public static void Execute(HealthComponent victim, CharacterBody killer) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)victim) && victim.alive && (!Object.op_Implicit((Object)(object)victim.body) || !victim.body.isBoss)) { victim.Suicide(Object.op_Implicit((Object)(object)killer) ? ((Component)killer).gameObject : null, Object.op_Implicit((Object)(object)killer) ? ((Component)killer).gameObject : null, default(DamageTypeCombo)); } } } internal static class HexFx { public static GameObject Botched; public static GameObject BoneShard; public static GameObject PainLink; public static GameObject Snatch; public static GameObject ReaperMiss; public static GameObject ReaperHit; public static GameObject ReaperSwoop; public static GameObject CrownJump; public static GameObject PhantomPoof; public static GameObject Slip; public static GameObject GhostCatch; public static GameObject GhostCarrier; public static GameObject BoneSpikes; public static GameObject StormCloud; public static GameObject WindZone; private static readonly Color Bone = new Color(0.93f, 0.9f, 0.8f); private static readonly Color Cursed = new Color(0.45f, 0.15f, 0.55f); private static readonly Color Gold = new Color(1f, 0.8f, 0.25f); private static readonly Color Rage = new Color(1f, 0.15f, 0.1f); private static readonly Vector3 Flat = new Vector3(90f, 0f, 0f); internal static void Register() { ContentProvider.AddBuilder(Build); } private static void Build(ContentPack pack) { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) Botched = Visuals.Effect("MoreQualityBotched", 2.5f, "Play_UI_menuClick", delegate(Transform root) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: 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) Visuals.Particles(root, "Smoke", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.2f, 0.05f, 0.25f), ColorEnd = new Color(0.05f, 0f, 0.05f), Size = 0.8f, Lifetime = 1.4f, Speed = 1.2f, Burst = 18, Shape = (ParticleSystemShapeType)0, Radius = 0.4f, Gravity = -0.1f, Grow = true, Spin = true, Drag = 0.4f }); Visuals.Particles(root, "Sparks", new Visuals.Spec { Material = Visuals.Kind.Spark, Color = Cursed, Size = 0.08f, Lifetime = 0.5f, Speed = 4f, Burst = 20, Shape = (ParticleSystemShapeType)0, Radius = 0.2f, Gravity = 0.8f, Stretch = true }); }); BoneShard = Visuals.Effect("MoreQualityBoneShard", 2.5f, null, delegate(Transform root) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) Material material = Visuals.Solid(Bone, new Color(0.25f, 0.22f, 0.15f), 0.4f); Transform transform = new GameObject("Shard").transform; transform.SetParent(root, false); Visuals.Model(transform, (PrimitiveType)3, Vector3.zero, new Vector3(0.14f, 0.14f, 0.75f), material); Visuals.Model(transform, (PrimitiveType)3, new Vector3(0f, 0f, 0.42f), new Vector3(0.09f, 0.09f, 0.2f), material).transform.localRotation = Quaternion.Euler(0f, 0f, 45f); Visuals.Model(transform, (PrimitiveType)0, new Vector3(0f, 0f, -0.38f), Vector3.one * 0.2f, material); Visuals.Particles(root, "Dust", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.85f, 0.8f, 0.7f), ColorEnd = new Color(0.4f, 0.38f, 0.32f), Size = 0.3f, Lifetime = 0.6f, Rate = 50f, Shape = (ParticleSystemShapeType)0, Radius = 0.1f, Grow = true, Spin = true }); MainModule main = Visuals.Particles(root, "Impact", new Visuals.Spec { Color = Bone, Size = 0.12f, Lifetime = 0.7f, Speed = 5f, Burst = 22, Shape = (ParticleSystemShapeType)0, Radius = 0.15f, Gravity = 1.5f, Shrink = true, Spin = true }).main; ((MainModule)(ref main)).playOnAwake = false; ((Component)root).gameObject.AddComponent<Visuals.StreakMover>().duration = 0.3f; }); PainLink = Visuals.Streak("MoreQualityPainLink", new Color(0.9f, 0.05f, 0.1f), 0.15f, null); Snatch = Visuals.Streak("MoreQualitySnatch", Gold, 0.3f, "Play_UI_coin"); CrownJump = Visuals.Streak("MoreQualityCrownJump", Gold, 0.6f, null); ReaperMiss = Visuals.Effect("MoreQualityReaperMiss", 1.5f, null, delegate(Transform root) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Slash", new Visuals.Spec { Material = Visuals.Kind.Spark, Color = new Color(0.25f, 0.1f, 0.3f), ColorEnd = new Color(0f, 0f, 0f), Size = 0.3f, Lifetime = 0.35f, Speed = 0.5f, Burst = 50, Shape = (ParticleSystemShapeType)10, Radius = 1.3f, Shell = true, Shrink = true, Rotation = new Vector3(0f, 90f, 0f) }); }); ReaperHit = Visuals.Effect("MoreQualityReaperHit", 2f, null, delegate(Transform root) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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) Visuals.Flash(root, Rage, 8f, 8f, 0.6f); Visuals.Particles(root, "Flash", new Visuals.Spec { Color = Rage, Size = 4f, Lifetime = 0.3f, Burst = 2, Shape = (ParticleSystemShapeType)0, Radius = 0.01f, Local = true, Grow = true }); Visuals.Particles(root, "Slash", new Visuals.Spec { Material = Visuals.Kind.Spark, Color = Rage, Size = 0.3f, Lifetime = 0.5f, Speed = 1f, Burst = 60, Shape = (ParticleSystemShapeType)10, Radius = 1.4f, Shell = true, Rotation = new Vector3(0f, 90f, 0f) }); }); ReaperSwoop = Visuals.Effect("MoreQualityReaperSwoop", 1.6f, null, Reaper, follow: true); PhantomPoof = Visuals.Effect("MoreQualityPhantomPoof", 2f, null, delegate(Transform root) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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) Visuals.Particles(root, "Smoke", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.6f, 0.6f, 0.7f), ColorEnd = new Color(0.2f, 0.2f, 0.25f), Size = 1f, Lifetime = 1.2f, Speed = 1.5f, Burst = 20, Shape = (ParticleSystemShapeType)0, Radius = 0.5f, Grow = true, Spin = true, Drag = 0.5f }); }); Slip = Visuals.Effect("MoreQualitySlip", 1.5f, "Play_UI_item_pickup", delegate(Transform root) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Sparkle", new Visuals.Spec { Color = new Color(0.7f, 0.9f, 1f), Size = 0.15f, Lifetime = 0.6f, Speed = 3f, Burst = 20, Shape = (ParticleSystemShapeType)0, Radius = 0.2f, Gravity = 0.5f, Shrink = true }); }); GhostCatch = Visuals.Effect("MoreQualityGhostCatch", 1.5f, null, delegate(Transform root) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) Visuals.Particles(root, "Wisps", new Visuals.Spec { Color = new Color(0.85f, 0.95f, 1f), Size = 0.3f, Lifetime = 0.8f, Speed = 2.5f, Burst = 25, Shape = (ParticleSystemShapeType)0, Radius = 0.3f, Gravity = -0.3f, Shrink = true, Noise = 0.5f }); }); GhostCarrier = Networked(pack, "MoreQualityGhostCarrier", moves: true, delegate(Transform root) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_00d7: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) Material material = Visuals.Solid(new Color(0.85f, 0.95f, 1f), new Color(0.6f, 0.85f, 1f), 2f); Visuals.Model(root, (PrimitiveType)0, Vector3.zero, Vector3.one * 0.6f, material); Material material2 = Visuals.Solid(Color.black, Color.black, 0f); Visuals.Model(root, (PrimitiveType)0, new Vector3(0.12f, 0.08f, 0.26f), new Vector3(0.1f, 0.14f, 0.06f), material2); Visuals.Model(root, (PrimitiveType)0, new Vector3(-0.12f, 0.08f, 0.26f), new Vector3(0.1f, 0.14f, 0.06f), material2); Visuals.Flash(root, new Color(0.7f, 0.9f, 1f), 4f, 1.5f, 0f); Visuals.Particles(root, "Wisp", new Visuals.Spec { Color = new Color(0.8f, 0.95f, 1f), Size = 0.3f, Lifetime = 0.8f, Rate = 30f, Speed = 0.2f, Shape = (ParticleSystemShapeType)0, Radius = 0.25f, Gravity = -0.2f, Shrink = true }); }); BoneSpikes = Networked(pack, "MoreQualityBoneSpikes", moves: false, delegate(Transform root) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0126: 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_0176: 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_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00ef: Unknown result type (might be due to invalid IL or missing references) Material material = Visuals.Solid(Bone, new Color(0.3f, 0.28f, 0.2f), 0.3f); Random random = new Random(7); for (int i = 0; i < 9; i++) { float num = (float)i * 40f + (float)random.Next(0, 20); float num2 = ((i == 0) ? 0f : (0.35f + (float)random.NextDouble() * 0.5f)); Vector3 val = Quaternion.Euler(0f, num, 0f) * Vector3.forward * num2; float num3 = 0.8f + (float)random.NextDouble() * 1.2f; Visuals.Model(root, (PrimitiveType)3, val + Vector3.up * num3 * 0.45f, new Vector3(0.18f, num3, 0.18f), material).transform.localRotation = Quaternion.Euler((float)random.Next(-25, 25), num, (float)random.Next(-25, 25)); } CapsuleCollider obj = ((Component)root).gameObject.AddComponent<CapsuleCollider>(); obj.radius = 0.9f; obj.height = 2.5f; obj.center = Vector3.up * 1.2f; ((Component)root).gameObject.layer = LayerIndex.world.intVal; Visuals.Particles(root, "Dust", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.8f, 0.75f, 0.65f), Size = 0.8f, Lifetime = 1.2f, Speed = 1.5f, Burst = 20, Shape = (ParticleSystemShapeType)10, Radius = 0.5f, Grow = true, Drag = 0.5f, Rotation = Flat }); }); WindZone = Networked(pack, "MoreQualityWindZone", moves: false, delegate(Transform root) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_00f8: 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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: 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_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) ((Component)Blowing(Visuals.Particles(root, "Streaks", new Visuals.Spec { Material = Visuals.Kind.Spark, Color = new Color(0.85f, 0.9f, 1f), Size = 0.12f, Lifetime = 0.7f, Rate = 90f, Speed = 0.01f, Shape = (ParticleSystemShapeType)5, Radius = 1f, Stretch = true, Local = true }), new Vector3(17f, 5f, 17f), 20f, 30f)).gameObject.transform.localPosition = Vector3.up * 2.5f; ((Component)Blowing(Visuals.Particles(root, "Dust", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.7f, 0.65f, 0.55f), Size = 0.8f, Lifetime = 1.2f, Rate = 25f, Speed = 0.01f, Shape = (ParticleSystemShapeType)5, Radius = 1f, Spin = true, Local = true }), new Vector3(17f, 1f, 17f), 8f, 14f)).gameObject.transform.localPosition = Vector3.up * 0.5f; Visuals.Particles(root, "Edge", new Visuals.Spec { Material = Visuals.Kind.Smoke, Color = new Color(0.75f, 0.8f, 0.85f), Size = 0.9f, Lifetime = 1.5f, Rate = 40f, Speed = 0.4f, Shape = (ParticleSystemShapeType)10, Radius = 10f, Shell = true, Gravity = -0.03f, Grow = true, Spin = true, Local = true, Rotation = Flat }); ((Component)root.parent).gameObject.AddComponent<Visuals.WindZoneMarker>(); }); StormCloud = Networked(pack, "MoreQualityStormCloud", moves: true, delegate(Transform root) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) /