using System;
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 System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using On.RoR2;
using RoR2;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using VoidDamageConfig.Changes;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("VoidDamageConfig")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("VoidDamageConfig")]
[assembly: AssemblyTitle("VoidDamageConfig")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
namespace VoidDamageConfig
{
public static class Configs
{
public static ConfigFile MainConfig;
private const string Section_VoidFog = "Void Fog Settings";
private const string Section_VoidKill = "Void Kill Settings";
private const string Section_Minion = "Minion Filter Settings";
private const string Label_Enable = "!Enable Changes";
private const string Desc_Enable = "Enables this section to function.";
public static string ConfigFolderPath => Path.Combine(Paths.ConfigPath, MainPlugin.pluginInfo.Metadata.GUID);
public static void Setup()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Expected O, but got Unknown
MainConfig = new ConfigFile(Path.Combine(ConfigFolderPath, "MainConfig.cfg"), true);
Read_LightConfig();
}
private static void Read_LightConfig()
{
EffectA.VoidFog_Enable = MainConfig.Bind<bool>("Void Fog Settings", "!Enable Changes", false, "Enables this section to function.").Value;
EffectA.VoidFog_OnlyMinion = MainConfig.Bind<bool>("Void Fog Settings", "Only Minions", true, "Apply all of this to just Minions.").Value;
EffectA.VoidFog_DamageType = MainConfig.Bind<int>("Void Fog Settings", "Fog Damage", 0, "How void fog damage is dealt. (0 = Vanilla, 1 = Nonlethal, 2 = No Damage)").Value;
EffectA.VoidFog_AllowArena = MainConfig.Bind<bool>("Void Fog Settings", "Minions In Void Fields", false, "Allow minions to spawn in Void Fields?").Value;
EffectA.VoidFog_AllowLocus = MainConfig.Bind<bool>("Void Fog Settings", "Minions In Void Locus", true, "Allow minions to spawn in Void Locus?").Value;
EffectA.VoidFog_NerfVoidLocus = MainConfig.Bind<bool>("Void Fog Settings", "Nerf Void Locus", false, "Makes Void Locus fog deal the same amount of damage as Void Fields fog.").Value;
EffectA.VoidDamage_Enable = MainConfig.Bind<bool>("Void Kill Settings", "!Enable Changes", false, "Enables this section to function.").Value;
EffectA.VoidDamage_OnlyMinion = MainConfig.Bind<bool>("Void Kill Settings", "Only Minions", true, "Apply all of this to just Minions.").Value;
EffectA.VoidDamage_MaxPercent = MainConfig.Bind<float>("Void Kill Settings", "Max Percent Damage", 0.05f, "Percent of Max Health to take as damage when hit by Void Instant Kills.").Value;
EffectA.VoidDamage_CurPercent = MainConfig.Bind<float>("Void Kill Settings", "Current Percent Damage", 0.45f, "Percent of Current Health to take as damage when hit by Void Instant Kills.").Value;
EffectA.VoidDamage_NonLethal = MainConfig.Bind<bool>("Void Kill Settings", "Nonlethal", false, "Makes Void Instant Kills nonlethal.").Value;
EffectA.VoidDamage_Nullify_Duration = MainConfig.Bind<float>("Void Kill Settings", "Nullify Duration", 3f, "Apply the Nullify debuff for this long when hit by Void Instant Kills").Value;
EffectA.VoidDamage_AllowOverride = MainConfig.Bind<bool>("Void Kill Settings", "Override Suicide", false, "Attempt to override Void attacks that force kill the target instead of damaging them, may cause stuttering and massive incompats, not recommended. (The only vanilla case is Voidling's Vacuum attack.)").Value;
EffectA.VoidDamage_OverrideDamage_Raw = MainConfig.Bind<string>("Void Kill Settings", "Override Suicide Divider", "MiniVoidRaidCrabBodyBase, 25, MiniVoidRaidCrabBodyPhase1, 25, MiniVoidRaidCrabBodyPhase2, 25, MiniVoidRaidCrabBodyPhase3, 25", "List of character bodies that get their Void damage divided when attempting to force kill a target.").Value;
EffectA.Minion_AllowPlayer = MainConfig.Bind<bool>("Minion Filter Settings", "Allow Player", false, "Allow minions currently being controlled by a player to pass as a minion.").Value;
EffectA.Minion_BodyWhiteList_Raw = MainConfig.Bind<string>("Minion Filter Settings", "Body Whitelist", "TitanGoldBody", "List of bodies that will always count as minions for the purpose of this mod. (Has priority over Blacklists)").Value;
EffectA.Minion_BodyBlackList_Raw = MainConfig.Bind<string>("Minion Filter Settings", "Body Blacklist", "EngiTurretBody, EngiWalkerTurretBody", "List of bodies that will never count as minions for the purpose of this mod.").Value;
EffectA.Minion_ItemWhiteList_Raw = MainConfig.Bind<string>("Minion Filter Settings", "Item Whitelist", "", "List of items that will make characters always count as minions for the purpose of this mod. (Has priority over Blacklists)").Value;
EffectA.Minion_ItemBlackList_Raw = MainConfig.Bind<string>("Minion Filter Settings", "Item Blacklist", "", "List of items that will make characters never count as minions for the purpose of this mod.").Value;
}
}
[BepInPlugin("com.kking117.VoidDamageConfig", "VoidDamageConfig", "1.0.1")]
public class MainPlugin : BaseUnityPlugin
{
public const string MODUID = "com.kking117.VoidDamageConfig";
public const string MODNAME = "VoidDamageConfig";
public const string MODTOKEN = "KKING117_VOIDDAMAGECONFIG_";
public const string MODVERSION = "1.0.1";
public const string LOGNAME = "[VoidDamageConfig] ";
internal static ManualLogSource ModLogger;
public static PluginInfo pluginInfo;
private void Awake()
{
ModLogger = ((BaseUnityPlugin)this).Logger;
pluginInfo = ((BaseUnityPlugin)this).Info;
Configs.Setup();
EnableChanges();
((ResourceAvailability)(ref GameModeCatalog.availability)).CallWhenAvailable((Action)PostLoad);
}
private void EnableChanges()
{
new EffectA();
}
private void PostLoad()
{
EffectA.PostLoad();
}
}
}
namespace VoidDamageConfig.Changes
{
public class EffectA
{
internal static bool VoidFog_Enable = false;
internal static bool VoidFog_OnlyMinion = true;
internal static bool VoidFog_AllowArena = false;
internal static bool VoidFog_AllowLocus = true;
internal static int VoidFog_DamageType = 0;
internal static bool VoidFog_NerfVoidLocus = false;
internal static bool VoidDamage_Enable = false;
internal static bool VoidDamage_OnlyMinion = true;
internal static float VoidDamage_MaxPercent = 0.05f;
internal static float VoidDamage_CurPercent = 0.45f;
internal static bool VoidDamage_NonLethal = false;
internal static float VoidDamage_Nullify_Duration = 3f;
internal static bool VoidDamage_AllowOverride = false;
internal static float[] VoidDamage_OverrideDamage;
internal static string VoidDamage_OverrideDamage_Raw;
private static DamageType VoidDamage_AddFlags = (DamageType)66;
internal static bool Minion_AllowPlayer = false;
internal static string Minion_BodyWhiteList_Raw;
internal static bool[] Minion_BodyWhiteList;
internal static string Minion_BodyBlackList_Raw;
internal static bool[] Minion_BodyBlackList;
internal static string Minion_ItemWhiteList_Raw;
internal static List<ItemIndex> Minion_ItemWhiteList;
internal static string Minion_ItemBlackList_Raw;
internal static List<ItemIndex> Minion_ItemBlackList;
public EffectA()
{
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Expected O, but got Unknown
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
//IL_0093: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Expected O, but got Unknown
if (!VoidFog_Enable && !VoidDamage_Enable)
{
return;
}
ClampConfig();
HealthComponent.TakeDamage += new hook_TakeDamage(OnTakeDamage);
if (VoidDamage_Enable && VoidDamage_AllowOverride)
{
HealthComponent.Suicide += new hook_Suicide(OnSuicide);
}
if (VoidFog_Enable)
{
if (VoidFog_AllowArena)
{
SceneChanges();
}
if (VoidFog_NerfVoidLocus)
{
VoidStageMissionController.RequestFog += new hook_RequestFog(VoidLocusRequestFog);
}
}
}
internal static void PostLoad()
{
//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_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Invalid comparison between Unknown and I4
//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_00fc: Invalid comparison between Unknown and I4
//IL_010a: Unknown result type (might be due to invalid IL or missing references)
//IL_0169: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_0173: Invalid comparison between Unknown and I4
//IL_0181: Unknown result type (might be due to invalid IL or missing references)
//IL_01df: Unknown result type (might be due to invalid IL or missing references)
//IL_01e4: 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_01e9: Invalid comparison between Unknown and I4
//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
//IL_020d: Unknown result type (might be due to invalid IL or missing references)
//IL_0270: Unknown result type (might be due to invalid IL or missing references)
//IL_0275: Unknown result type (might be due to invalid IL or missing references)
//IL_0277: Unknown result type (might be due to invalid IL or missing references)
//IL_027a: Invalid comparison between Unknown and I4
//IL_0288: Unknown result type (might be due to invalid IL or missing references)
//IL_029e: Unknown result type (might be due to invalid IL or missing references)
int bodyCount = BodyCatalog.bodyCount;
VoidDamage_OverrideDamage = new float[bodyCount];
for (int i = 0; i < VoidDamage_OverrideDamage.Length; i++)
{
VoidDamage_OverrideDamage[i] = 1f;
}
string[] array = VoidDamage_OverrideDamage_Raw.Split(new char[1] { ',' });
for (int j = 0; j + 1 < array.Length; j += 2)
{
array[j] = array[j].Trim();
array[j + 1] = array[j + 1].Trim();
BodyIndex val = BodyCatalog.FindBodyIndex(array[j]);
if ((int)val > -1 && float.TryParse(array[1], out var result))
{
VoidDamage_OverrideDamage[val] = result;
}
}
bool flag = false;
Minion_BodyWhiteList = new bool[bodyCount];
array = Minion_BodyWhiteList_Raw.Split(new char[1] { ',' });
for (int k = 0; k < array.Length; k++)
{
BodyIndex val2 = BodyCatalog.FindBodyIndex(array[k].Trim());
if ((int)val2 > -1)
{
Minion_BodyWhiteList[val2] = true;
flag = true;
}
}
if (!flag)
{
Minion_BodyWhiteList = null;
}
flag = false;
Minion_BodyBlackList = new bool[bodyCount];
array = Minion_BodyBlackList_Raw.Split(new char[1] { ',' });
for (int l = 0; l < array.Length; l++)
{
BodyIndex val3 = BodyCatalog.FindBodyIndex(array[l].Trim());
if ((int)val3 > -1)
{
Minion_BodyBlackList[val3] = true;
flag = true;
}
}
if (!flag)
{
Minion_BodyBlackList = null;
}
flag = false;
Minion_ItemWhiteList = new List<ItemIndex>();
array = Minion_ItemWhiteList_Raw.Split(new char[1] { ',' });
for (int m = 0; m < array.Length; m++)
{
ItemIndex val4 = ItemCatalog.FindItemIndex(array[m].Trim());
if ((int)val4 > -1 && !Minion_ItemWhiteList.Contains(val4))
{
Minion_ItemWhiteList.Add(val4);
flag = true;
}
}
if (!flag)
{
Minion_ItemBlackList = null;
}
flag = false;
Minion_ItemBlackList = new List<ItemIndex>();
array = Minion_ItemBlackList_Raw.Split(new char[1] { ',' });
for (int n = 0; n < array.Length; n++)
{
ItemIndex val5 = ItemCatalog.FindItemIndex(array[n].Trim());
if ((int)val5 > -1 && !Minion_ItemBlackList.Contains(val5))
{
Minion_ItemBlackList.Add(val5);
flag = true;
}
}
if (!flag)
{
Minion_ItemBlackList = null;
}
}
private void ClampConfig()
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: 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)
Math.Max(0f, VoidDamage_MaxPercent);
Math.Max(0f, VoidDamage_CurPercent);
if (VoidDamage_NonLethal)
{
VoidDamage_AddFlags = (DamageType)(VoidDamage_AddFlags | 1);
}
}
private void SceneChanges()
{
//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_0038: 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)
if (VoidFog_AllowArena)
{
SceneDef val = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/Base/arena/arena.asset").WaitForCompletion();
val.suppressNpcEntry = false;
}
if (!VoidFog_AllowLocus)
{
SceneDef val2 = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/voidstage/voidstage.asset").WaitForCompletion();
val2.suppressNpcEntry = true;
}
}
private FogRequest VoidLocusRequestFog(orig_RequestFog orig, VoidStageMissionController self, IZone zone)
{
if (Object.op_Implicit((Object)(object)self.fogDamageController))
{
self.fogDamageController.healthFractionPerSecond = 0.025f;
self.fogDamageController.healthFractionRampCoefficientPerSecond = 0f;
}
return orig.Invoke(self, zone);
}
private void OnSuicide(orig_Suicide orig, HealthComponent self, GameObject killerOverride, GameObject inflictorOverride, DamageType damageType)
{
//IL_00da: 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_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Invalid comparison between Unknown and I4
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Invalid comparison between Unknown and I4
//IL_0049: 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_006a: 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_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
//IL_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_0090: Expected O, but got Unknown
if (NetworkServer.active && (damageType & 0x10000) > 0)
{
TeamComponent teamComponent = self.body.teamComponent;
if (Object.op_Implicit((Object)(object)teamComponent) && (int)teamComponent.teamIndex == 1)
{
DamageInfo val = new DamageInfo
{
damage = Run.instance.ambientLevel * 2.4f + 12f,
damageType = damageType,
position = ((Component)self).transform.position,
procCoefficient = 1f
};
if (Object.op_Implicit((Object)(object)killerOverride))
{
val.attacker = killerOverride;
}
if (Object.op_Implicit((Object)(object)inflictorOverride))
{
val.inflictor = inflictorOverride;
}
val = GetNewForcedVoidDamage(val);
self.TakeDamage(val);
return;
}
}
orig.Invoke(self, killerOverride, inflictorOverride, damageType);
}
private void OnTakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
{
//IL_0073: 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_007a: 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_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
bool flag = false;
if (NetworkServer.active)
{
int voidDamageType = GetVoidDamageType(damageInfo);
if (voidDamageType > 0)
{
if (voidDamageType == 1 && VoidFog_PassFilter(self.body))
{
if (VoidFog_DamageType == 2)
{
damageInfo.damage = 0f;
damageInfo.rejected = true;
}
else if (VoidFog_DamageType == 1)
{
damageInfo.damageType = (DamageType)(damageInfo.damageType | 1);
}
}
else if (voidDamageType == 2 && VoidDamage_PassFilter(self.body))
{
CharacterBody body = self.body;
body.bodyFlags = (BodyFlags)(body.bodyFlags | 0x800);
damageInfo.damage = GetNewVoidDamage(self, damageInfo, voidDamageType);
damageInfo.damageType |= VoidDamage_AddFlags;
flag = VoidDamage_Nullify_Duration > 0f;
}
}
}
orig.Invoke(self, damageInfo);
if (flag && NetworkServer.active && !damageInfo.rejected)
{
CharacterBody component = ((Component)self).GetComponent<CharacterBody>();
if (Object.op_Implicit((Object)(object)component))
{
component.AddTimedBuff(Buffs.Nullified, VoidDamage_Nullify_Duration);
}
}
}
private bool VoidFog_PassFilter(CharacterBody body)
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Invalid comparison between Unknown and I4
TeamComponent teamComponent = body.teamComponent;
CharacterMaster master = body.master;
if (!Object.op_Implicit((Object)(object)teamComponent))
{
return false;
}
if ((int)teamComponent.teamIndex == 1)
{
if (!VoidFog_OnlyMinion)
{
return true;
}
if (Object.op_Implicit((Object)(object)master))
{
return PassFilter_ValidMinion(master, body);
}
}
return false;
}
private bool VoidDamage_PassFilter(CharacterBody body)
{
//IL_0022: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Invalid comparison between Unknown and I4
TeamComponent teamComponent = body.teamComponent;
CharacterMaster master = body.master;
if (!Object.op_Implicit((Object)(object)teamComponent))
{
return false;
}
if ((int)teamComponent.teamIndex == 1)
{
if (!VoidDamage_OnlyMinion)
{
return true;
}
if (Object.op_Implicit((Object)(object)master))
{
return PassFilter_ValidMinion(master, body);
}
}
return false;
}
private bool PassFilter_ValidMinion(CharacterMaster master, CharacterBody body)
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Expected I4, but got Unknown
if (!Minion_AllowPlayer && body.isPlayerControlled)
{
return false;
}
int num = (int)body.bodyIndex;
if (Minion_BodyWhiteList != null && Minion_BodyWhiteList[num])
{
return true;
}
if (Minion_ItemWhiteList != null)
{
Inventory inventory = master.inventory;
if (PassItem_WhiteList(inventory))
{
return true;
}
}
if (Minion_BodyBlackList != null && Minion_BodyBlackList[num])
{
return false;
}
if (Minion_ItemBlackList != null)
{
Inventory inventory2 = master.inventory;
if (PassItem_BlackList(inventory2))
{
return false;
}
}
MinionOwnership component = ((Component)master).GetComponent<MinionOwnership>();
if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.ownerMaster))
{
return false;
}
if ((Object)(object)master == (Object)(object)component.ownerMaster)
{
return false;
}
return true;
}
private bool PassItem_WhiteList(Inventory inventory)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
for (int i = 0; i < Minion_ItemWhiteList.Count; i++)
{
if (inventory.GetItemCount(Minion_ItemWhiteList.ElementAt(i)) > 0)
{
return true;
}
}
return false;
}
private bool PassItem_BlackList(Inventory inventory)
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
for (int i = 0; i < Minion_ItemBlackList.Count; i++)
{
if (inventory.GetItemCount(Minion_ItemBlackList.ElementAt(i)) > 0)
{
return true;
}
}
return false;
}
private int GetVoidDamageType(DamageInfo damageInfo)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Invalid comparison between Unknown and I4
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: Invalid comparison between Unknown and I4
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Invalid comparison between Unknown and I4
if ((int)damageInfo.damageColorIndex == 9)
{
if (VoidFog_Enable && (int)damageInfo.damageType == 66 && (!Object.op_Implicit((Object)(object)damageInfo.attacker) & !Object.op_Implicit((Object)(object)damageInfo.inflictor)))
{
return 1;
}
}
else if (VoidDamage_Enable && (damageInfo.damageType & 0x10000) > 0)
{
return 2;
}
return 0;
}
private float GetNewVoidDamage(HealthComponent victimHP, DamageInfo damageInfo, int voidDamage)
{
float num = damageInfo.procCoefficient;
if (num <= 0f)
{
num = 1f;
}
float num2 = victimHP.combinedHealth * VoidDamage_CurPercent * num;
num2 += victimHP.fullCombinedHealth * VoidDamage_MaxPercent * num;
float num3 = damageInfo.damage * num;
return (num2 > num3) ? num2 : num3;
}
private DamageInfo GetNewForcedVoidDamage(DamageInfo damageInfo)
{
//IL_0029: 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_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Invalid comparison between Unknown and I4
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Invalid comparison between Unknown and I4
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)damageInfo.attacker))
{
CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
if (Object.op_Implicit((Object)(object)component))
{
BodyIndex bodyIndex = component.bodyIndex;
if ((int)bodyIndex > -1 && (int)bodyIndex < VoidDamage_OverrideDamage.Length)
{
damageInfo.procCoefficient /= VoidDamage_OverrideDamage[bodyIndex];
}
damageInfo.damage = component.damage * 1f;
}
}
return damageInfo;
}
}
}