using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HG;
using Krod.Buffs;
using Krod.Equipment;
using Krod.Items.Tier1;
using Krod.Items.Tier2;
using Krod.Items.Tier3;
using Microsoft.CodeAnalysis;
using On.RoR2;
using On.RoR2.Items;
using R2API;
using RoR2;
using RoR2.DirectionalSearch;
using RoR2.Projectile;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("Krod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+e3915d8dd5d25aee112e4c85b9d73ee38134d618")]
[assembly: AssemblyProduct("Krod")]
[assembly: AssemblyTitle("Krod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace Krod
{
internal static class Log
{
private static ManualLogSource _logSource;
internal static void Init(ManualLogSource logSource)
{
_logSource = logSource;
}
internal static void Debug(object data)
{
_logSource.LogDebug(data);
}
internal static void Error(object data)
{
_logSource.LogError(data);
}
internal static void Fatal(object data)
{
_logSource.LogFatal(data);
}
internal static void Info(object data)
{
_logSource.LogInfo(data);
}
internal static void Message(object data)
{
_logSource.LogMessage(data);
}
internal static void Warning(object data)
{
_logSource.LogWarning(data);
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("Rory.Krod", "Krod", "0.0.3")]
public class MainPlugin : BaseUnityPlugin
{
public const string PluginGUID = "Rory.Krod";
public const string PluginAuthor = "Rory";
public const string PluginName = "Krod";
public const string PluginVersion = "0.0.3";
public void Awake()
{
Log.Init(((BaseUnityPlugin)this).Logger);
Defs.Awake();
LooseCards.Awake();
MisterBoinky.Awake();
ArcadeToken.Awake();
DiscountCoffee.Awake();
DoubleFish.Awake();
Woodhat.Awake();
TimsCrucible.Awake();
JeffsServiceMedal.Awake();
AileensGlassEye.Awake();
}
private void Update()
{
}
}
}
namespace Krod.Items.Tier3
{
internal class JeffsApprehension
{
}
public static class RorysForsight
{
public static ItemDef def;
public static void Awake()
{
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: 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_00a2: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Expected O, but got Unknown
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<ItemDef>();
def.canRemove = true;
((Object)def).name = "RORYS_FORSIGHT_NAME";
def.nameToken = "RORYS_FORSIGHT_NAME";
def.pickupToken = "RORYS_FORSIGHT_PICKUP";
def.descriptionToken = "RORYS_FORSIGHT_DESC";
def.loreToken = "RORYS_FORSIGHT_LORE";
def._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier3Def.asset").WaitForCompletion();
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomItem(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
}
}
public static class TimsCrucible
{
[CompilerGenerated]
private static class <>O
{
public static hook_OnDotStackAddedServer <0>__DotController_OnDotStackAddedServer;
public static hook_OnDotStackRemovedServer <1>__DotController_OnDotStackRemovedServer;
public static hook_OnBuffFirstStackGained <2>__CharacterBody_OnBuffFirstStackGained;
public static hook_OnBuffFinalStackLost <3>__CharacterBody_OnBuffFinalStackLost;
public static hook_OnSkillActivated <4>__CharacterBody_OnSkillActivated;
public static hook_TakeDamage <5>__HealthComponent_TakeDamage;
public static hook_OnEquipmentGained <6>__CharacterBody_OnEquipmentGained;
public static hook_OnEquipmentLost <7>__CharacterBody_OnEquipmentLost;
public static StatHookEventHandler <8>__RecalculateStatsAPI_GetStatCoefficients;
}
public static ItemDef def;
public static void Awake()
{
//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_009a: 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_00b6: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Expected O, but got Unknown
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected O, but got Unknown
//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)
//IL_00f9: Expected O, but got Unknown
//IL_010e: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Expected O, but got Unknown
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Expected O, but got Unknown
//IL_014e: Unknown result type (might be due to invalid IL or missing references)
//IL_0153: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: Expected O, but got Unknown
//IL_016e: Unknown result type (might be due to invalid IL or missing references)
//IL_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_0179: Expected O, but got Unknown
//IL_018e: Unknown result type (might be due to invalid IL or missing references)
//IL_0193: Unknown result type (might be due to invalid IL or missing references)
//IL_0199: Expected O, but got Unknown
//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
//IL_01b9: Expected O, but got Unknown
//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
//IL_01d9: Expected O, but got Unknown
//IL_01ee: 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_01f9: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<ItemDef>();
def.canRemove = true;
((Object)def).name = "TIMS_CRUCIBLE_NAME";
def.nameToken = "TIMS_CRUCIBLE_NAME";
def.pickupToken = "TIMS_CRUCIBLE_PICKUP";
def.descriptionToken = "TIMS_CRUCIBLE_DESC";
def.loreToken = "TIMS_CRUCIBLE_LORE";
def.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 };
def._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier3Def.asset").WaitForCompletion();
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomItem(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
object obj = <>O.<0>__DotController_OnDotStackAddedServer;
if (obj == null)
{
hook_OnDotStackAddedServer val = DotController_OnDotStackAddedServer;
<>O.<0>__DotController_OnDotStackAddedServer = val;
obj = (object)val;
}
DotController.OnDotStackAddedServer += (hook_OnDotStackAddedServer)obj;
object obj2 = <>O.<1>__DotController_OnDotStackRemovedServer;
if (obj2 == null)
{
hook_OnDotStackRemovedServer val2 = DotController_OnDotStackRemovedServer;
<>O.<1>__DotController_OnDotStackRemovedServer = val2;
obj2 = (object)val2;
}
DotController.OnDotStackRemovedServer += (hook_OnDotStackRemovedServer)obj2;
object obj3 = <>O.<2>__CharacterBody_OnBuffFirstStackGained;
if (obj3 == null)
{
hook_OnBuffFirstStackGained val3 = CharacterBody_OnBuffFirstStackGained;
<>O.<2>__CharacterBody_OnBuffFirstStackGained = val3;
obj3 = (object)val3;
}
CharacterBody.OnBuffFirstStackGained += (hook_OnBuffFirstStackGained)obj3;
object obj4 = <>O.<3>__CharacterBody_OnBuffFinalStackLost;
if (obj4 == null)
{
hook_OnBuffFinalStackLost val4 = CharacterBody_OnBuffFinalStackLost;
<>O.<3>__CharacterBody_OnBuffFinalStackLost = val4;
obj4 = (object)val4;
}
CharacterBody.OnBuffFinalStackLost += (hook_OnBuffFinalStackLost)obj4;
object obj5 = <>O.<4>__CharacterBody_OnSkillActivated;
if (obj5 == null)
{
hook_OnSkillActivated val5 = CharacterBody_OnSkillActivated;
<>O.<4>__CharacterBody_OnSkillActivated = val5;
obj5 = (object)val5;
}
CharacterBody.OnSkillActivated += (hook_OnSkillActivated)obj5;
object obj6 = <>O.<5>__HealthComponent_TakeDamage;
if (obj6 == null)
{
hook_TakeDamage val6 = HealthComponent_TakeDamage;
<>O.<5>__HealthComponent_TakeDamage = val6;
obj6 = (object)val6;
}
HealthComponent.TakeDamage += (hook_TakeDamage)obj6;
object obj7 = <>O.<6>__CharacterBody_OnEquipmentGained;
if (obj7 == null)
{
hook_OnEquipmentGained val7 = CharacterBody_OnEquipmentGained;
<>O.<6>__CharacterBody_OnEquipmentGained = val7;
obj7 = (object)val7;
}
CharacterBody.OnEquipmentGained += (hook_OnEquipmentGained)obj7;
object obj8 = <>O.<7>__CharacterBody_OnEquipmentLost;
if (obj8 == null)
{
hook_OnEquipmentLost val8 = CharacterBody_OnEquipmentLost;
<>O.<7>__CharacterBody_OnEquipmentLost = val8;
obj8 = (object)val8;
}
CharacterBody.OnEquipmentLost += (hook_OnEquipmentLost)obj8;
object obj9 = <>O.<8>__RecalculateStatsAPI_GetStatCoefficients;
if (obj9 == null)
{
StatHookEventHandler val9 = RecalculateStatsAPI_GetStatCoefficients;
<>O.<8>__RecalculateStatsAPI_GetStatCoefficients = val9;
obj9 = (object)val9;
}
RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj9;
}
private static void CharacterBody_OnEquipmentLost(orig_OnEquipmentLost orig, CharacterBody self, EquipmentDef equipmentDef)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
if (equipmentDef.equipmentIndex == Equipment.AffixRed.equipmentIndex)
{
self.RemoveBuff(Defs.TimIsOnFire);
}
orig.Invoke(self, equipmentDef);
}
private static void CharacterBody_OnEquipmentGained(orig_OnEquipmentGained orig, CharacterBody self, EquipmentDef equipmentDef)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
if (equipmentDef.equipmentIndex == Equipment.AffixRed.equipmentIndex)
{
int? obj;
if (self == null)
{
obj = null;
}
else
{
Inventory inventory = self.inventory;
obj = ((inventory != null) ? new int?(inventory.GetItemCount(def)) : null);
}
int? num = obj;
if (num.GetValueOrDefault() > 0)
{
self.AddBuff(Defs.TimIsOnFire);
}
}
orig.Invoke(self, equipmentDef);
}
private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Invalid comparison between Unknown and I4
object obj;
if (self == null)
{
obj = null;
}
else
{
CharacterBody body = self.body;
obj = ((body != null) ? body.inventory : null);
}
Inventory val = (Inventory)obj;
if ((Object)(object)val != (Object)null && (int)damageInfo.dotIndex == 1 && val.GetItemCount(def) > 0)
{
damageInfo.damage = 0f;
}
orig.Invoke(self, damageInfo);
}
private static void CharacterBody_OnSkillActivated(orig_OnSkillActivated orig, CharacterBody self, GenericSkill skill)
{
//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(self, skill);
int? obj;
if (self == null)
{
obj = null;
}
else
{
Inventory inventory = self.inventory;
obj = ((inventory != null) ? new int?(inventory.GetItemCount(def)) : null);
}
int? num = obj;
int valueOrDefault = num.GetValueOrDefault();
if (valueOrDefault > 0 && ((Object)skill.skillFamily).name.Contains("Utility") && DotController.FindDotController(((Component)self).gameObject)?.dotStackList.Find((DotStack e) => (int)e.dotIndex == 1) == null)
{
InflictDotInfo val = default(InflictDotInfo);
val.attackerObject = ((Component)self).gameObject;
val.victimObject = ((Component)self).gameObject;
val.duration = 2.5f + Mathf.Min((float)valueOrDefault * 0.5f, 5f);
val.dotIndex = (DotIndex)1;
InflictDotInfo val2 = val;
DotController.InflictDot(ref val2);
}
}
private static void CharacterBody_OnBuffFinalStackLost(orig_OnBuffFinalStackLost orig, CharacterBody self, BuffDef buffDef)
{
orig.Invoke(self, buffDef);
self.RecalculateStats();
}
private static void CharacterBody_OnBuffFirstStackGained(orig_OnBuffFirstStackGained orig, CharacterBody self, BuffDef buffDef)
{
orig.Invoke(self, buffDef);
self.RecalculateStats();
}
private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)((sender != null) ? sender.inventory : null)) && sender.HasBuff(Defs.TimIsOnFire))
{
int itemCount = sender.inventory.GetItemCount(def.itemIndex);
args.attackSpeedMultAdd = 0.3f * (float)itemCount;
args.armorAdd = 20 * itemCount;
args.moveSpeedMultAdd = 0.2f * (float)itemCount;
}
}
private static void DotController_OnDotStackRemovedServer(orig_OnDotStackRemovedServer orig, DotController self, object _dotStack)
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Invalid comparison between Unknown and I4
orig.Invoke(self, _dotStack);
DotStack val = (DotStack)((_dotStack is DotStack) ? _dotStack : null);
if (val != null && (int)val.dotIndex == 1 && self.dotStackList.Find((DotStack e) => (int)e.dotIndex == 1) == null)
{
CharacterBody val2 = ((self != null) ? self.victimBody : null);
if (val2 != null && val2.HasBuff(Defs.TimIsOnFire))
{
val2.RemoveBuff(Defs.TimIsOnFire);
val2.RemoveBuff(Buffs.AffixRed);
}
}
}
private static void DotController_OnDotStackAddedServer(orig_OnDotStackAddedServer orig, DotController self, object _dotStack)
{
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0019: Invalid comparison between Unknown and I4
orig.Invoke(self, _dotStack);
DotStack val = (DotStack)((_dotStack is DotStack) ? _dotStack : null);
if (val != null && (int)val.dotIndex == 1)
{
CharacterBody victimBody = self.victimBody;
int? obj;
if (victimBody == null)
{
obj = null;
}
else
{
Inventory inventory = victimBody.inventory;
obj = ((inventory != null) ? new int?(inventory.GetItemCount(def)) : null);
}
int? num = obj;
if (num.GetValueOrDefault() > 0 && !victimBody.HasBuff(Defs.TimIsOnFire))
{
self.victimBody.AddBuff(Defs.TimIsOnFire);
self.victimBody.AddBuff(Buffs.AffixRed);
}
}
}
}
}
namespace Krod.Items.Tier2
{
public static class DoubleFish
{
public class DoubleFishBehavior : MonoBehaviour
{
public void Start()
{
}
public void HitAgain(DamageReport damageReport)
{
((MonoBehaviour)this).StartCoroutine(DelayedHit(damageReport));
}
public IEnumerator DelayedHit(DamageReport damageReport)
{
DamageInfo di = new DamageInfo
{
damage = damageReport.damageDealt,
attacker = damageReport.attacker,
inflictor = damageReport.damageInfo.inflictor,
force = damageReport.damageInfo.force,
crit = damageReport.damageInfo.crit,
procChainMask = damageReport.damageInfo.procChainMask,
procCoefficient = damageReport.damageInfo.procCoefficient * 0.5f,
position = ((Component)damageReport.victim).transform.position,
damageColorIndex = (DamageColorIndex)3,
damageType = damageReport.damageInfo.damageType
};
DamageAPI.AddModdedDamageType(di, fishDamageType);
yield return (object)new WaitForSeconds(0.2f);
if (damageReport.victimBody.healthComponent.alive)
{
di.position = ((Component)damageReport.victim).transform.position;
damageReport.victimBody.healthComponent.TakeDamage(di);
}
}
}
[CompilerGenerated]
private static class <>O
{
public static hook_ServerDamageDealt <0>__GlobalEventManager_ServerDamageDealt;
}
public static ItemDef def;
public static ModdedDamageType fishDamageType;
public static void Awake()
{
//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_009a: 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_00b6: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Expected O, but got Unknown
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected O, but got Unknown
//IL_00de: 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_00f8: Unknown result type (might be due to invalid IL or missing references)
//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<ItemDef>();
def.canRemove = true;
((Object)def).name = "DOUBLEFISH_NAME";
def.nameToken = "DOUBLEFISH_NAME";
def.pickupToken = "DOUBLEFISH_PICKUP";
def.descriptionToken = "DOUBLEFISH_DESC";
def.loreToken = "DOUBLEFISH_LORE";
def.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 };
def._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier2Def.asset").WaitForCompletion();
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomItem(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
fishDamageType = DamageAPI.ReserveDamageType();
object obj = <>O.<0>__GlobalEventManager_ServerDamageDealt;
if (obj == null)
{
hook_ServerDamageDealt val = GlobalEventManager_ServerDamageDealt;
<>O.<0>__GlobalEventManager_ServerDamageDealt = val;
obj = (object)val;
}
GlobalEventManager.ServerDamageDealt += (hook_ServerDamageDealt)obj;
}
private static void GlobalEventManager_ServerDamageDealt(orig_ServerDamageDealt orig, DamageReport damageReport)
{
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)damageReport.damageInfo.attacker != (Object)(object)damageReport.victim && damageReport.damageInfo.procCoefficient > 0f && !DamageAPI.HasModdedDamageType(damageReport.damageInfo, fishDamageType))
{
object obj;
if (damageReport == null)
{
obj = null;
}
else
{
DamageInfo damageInfo = damageReport.damageInfo;
if (damageInfo == null)
{
obj = null;
}
else
{
GameObject attacker = damageInfo.attacker;
obj = ((attacker != null) ? attacker.GetComponent<CharacterBody>() : null);
}
}
CharacterBody val = (CharacterBody)obj;
if ((Object)(object)val != (Object)null)
{
int itemCount = val.inventory.GetItemCount(def);
if (itemCount > 0 && Util.CheckRoll(2.5f * (float)itemCount, val.master))
{
CharacterBody component = ((Component)damageReport.victim).GetComponent<CharacterBody>();
DoubleFishBehavior component2 = ((Component)component).gameObject.GetComponent<DoubleFishBehavior>();
if ((Object)(object)component2 == (Object)null)
{
component2 = ((Component)component).gameObject.AddComponent<DoubleFishBehavior>();
component2.HitAgain(damageReport);
}
else
{
component2.HitAgain(damageReport);
}
}
}
}
orig.Invoke(damageReport);
}
}
internal class ToyMotorcycle
{
}
public static class Woodhat
{
[CompilerGenerated]
private static class <>O
{
public static StatHookEventHandler <0>__RecalculateStatsAPI_GetStatCoefficients;
}
public static ItemDef def;
public static void Awake()
{
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_006f: 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_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Expected O, but got Unknown
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected O, but got Unknown
//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)
//IL_00f9: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<ItemDef>();
def.canRemove = true;
((Object)def).name = "WOODHAT_NAME";
def.nameToken = "WOODHAT_NAME";
def.pickupToken = "WOODHAT_PICKUP";
def.descriptionToken = "WOODHAT_DESC";
def.loreToken = "WOODHAT_LORE";
def._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier2Def.asset").WaitForCompletion();
def.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 };
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomItem(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
object obj = <>O.<0>__RecalculateStatsAPI_GetStatCoefficients;
if (obj == null)
{
StatHookEventHandler val = RecalculateStatsAPI_GetStatCoefficients;
<>O.<0>__RecalculateStatsAPI_GetStatCoefficients = val;
obj = (object)val;
}
RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj;
}
private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
{
Inventory val = ((sender != null) ? sender.inventory : null);
if ((Object)(object)val != (Object)null)
{
int itemCount = val.GetItemCount(def);
args.armorAdd += (float)(itemCount * 10);
}
}
}
}
namespace Krod.Items.Tier1
{
public class ArcadeToken
{
[CompilerGenerated]
private static class <>O
{
public static hook_OnPurchase <0>__MultiShopCardUtils_OnPurchase;
}
public static ItemDef def;
public static void Awake()
{
//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_009a: 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_00b6: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Expected O, but got Unknown
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected O, but got Unknown
//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)
//IL_00f9: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<ItemDef>();
def.canRemove = true;
((Object)def).name = "ARCADE_TOKEN_NAME";
def.nameToken = "ARCADE_TOKEN_NAME";
def.pickupToken = "ARCADE_TOKEN_PICKUP";
def.descriptionToken = "ARCADE_TOKEN_DESC";
def.loreToken = "ARCADE_TOKEN_LORE";
def.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 };
def._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion();
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomItem(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
object obj = <>O.<0>__MultiShopCardUtils_OnPurchase;
if (obj == null)
{
hook_OnPurchase val = MultiShopCardUtils_OnPurchase;
<>O.<0>__MultiShopCardUtils_OnPurchase = val;
obj = (object)val;
}
MultiShopCardUtils.OnPurchase += (hook_OnPurchase)obj;
}
private static void MultiShopCardUtils_OnPurchase(orig_OnPurchase orig, PayCostContext context, int moneyCost)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: 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_00c9: Unknown result type (might be due to invalid IL or missing references)
orig.Invoke(context, moneyCost);
CharacterMaster activatorMaster = context.activatorMaster;
if (activatorMaster == null)
{
return;
}
Inventory inventory = activatorMaster.inventory;
if (((inventory != null) ? new int?(inventory.GetItemCount(def)) : null) > 0 && Object.op_Implicit((Object)(object)context.purchasedObject))
{
ShopTerminalBehavior component = context.purchasedObject.GetComponent<ShopTerminalBehavior>();
if (Object.op_Implicit((Object)(object)component?.serverMultiShopController) && ((IEnumerable<GameObject>)(object)component.serverMultiShopController.terminalGameObjects).Where(delegate(GameObject obj)
{
PurchaseInteraction component2 = obj.GetComponent<PurchaseInteraction>();
return component2 != null && component2.Networkavailable;
}).Count() > 1)
{
component.serverMultiShopController.SetCloseOnTerminalPurchase(context.purchasedObject.GetComponent<PurchaseInteraction>(), false);
activatorMaster.inventory.RemoveItem(def, 1);
}
}
}
}
public class DiscountCoffee
{
public class DiscountCoffeeBehavior : ItemBehavior
{
public void Awake()
{
((Behaviour)this).enabled = false;
}
public void OnEnable()
{
CharacterBody body = base.body;
if (body != null && body.HasBuff(buff))
{
return;
}
CharacterBody body2 = base.body;
int? obj;
if (body2 == null)
{
obj = null;
}
else
{
Inventory inventory = body2.inventory;
obj = ((inventory != null) ? new int?(inventory.GetItemCount(def)) : null);
}
int? num = obj;
int valueOrDefault = num.GetValueOrDefault();
if (valueOrDefault > 0)
{
CharacterBody body3 = base.body;
if (body3 != null)
{
body3.AddTimedBuff(buff, 50f + (float)valueOrDefault * 10f);
}
}
}
public void OnDisable()
{
CharacterBody body = base.body;
if (body != null && body.HasBuff(buff))
{
base.body.RemoveBuff(buff);
}
}
}
[CompilerGenerated]
private static class <>O
{
public static hook_OnInventoryChanged <0>__CharacterBody_OnInventoryChanged;
public static hook_OnInteractionBegin <1>__PurchaseInteraction_OnInteractionBegin;
public static StatHookEventHandler <2>__RecalculateStatsAPI_GetStatCoefficients;
}
public static ItemDef def;
public static BuffDef buff;
public static void Awake()
{
//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_009a: 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_00b6: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Expected O, but got Unknown
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected O, but got Unknown
//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)
//IL_00f9: Expected O, but got Unknown
//IL_010e: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Expected O, but got Unknown
//IL_0177: Unknown result type (might be due to invalid IL or missing references)
//IL_017c: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_0133: Unknown result type (might be due to invalid IL or missing references)
//IL_0139: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<ItemDef>();
def.canRemove = true;
((Object)def).name = "DISCOUNT_COFFEE_NAME";
def.nameToken = "DISCOUNT_COFFEE_NAME";
def.pickupToken = "DISCOUNT_COFFEE_PICKUP";
def.descriptionToken = "DISCOUNT_COFFEE_DESC";
def.loreToken = "DISCOUNT_COFFEE_LORE";
def.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 };
def._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion();
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomItem(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
object obj = <>O.<0>__CharacterBody_OnInventoryChanged;
if (obj == null)
{
hook_OnInventoryChanged val = CharacterBody_OnInventoryChanged;
<>O.<0>__CharacterBody_OnInventoryChanged = val;
obj = (object)val;
}
CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)obj;
object obj2 = <>O.<1>__PurchaseInteraction_OnInteractionBegin;
if (obj2 == null)
{
hook_OnInteractionBegin val2 = PurchaseInteraction_OnInteractionBegin;
<>O.<1>__PurchaseInteraction_OnInteractionBegin = val2;
obj2 = (object)val2;
}
PurchaseInteraction.OnInteractionBegin += (hook_OnInteractionBegin)obj2;
object obj3 = <>O.<2>__RecalculateStatsAPI_GetStatCoefficients;
if (obj3 == null)
{
StatHookEventHandler val3 = RecalculateStatsAPI_GetStatCoefficients;
<>O.<2>__RecalculateStatsAPI_GetStatCoefficients = val3;
obj3 = (object)val3;
}
RecalculateStatsAPI.GetStatCoefficients += (StatHookEventHandler)obj3;
buff = ScriptableObject.CreateInstance<BuffDef>();
buff.isDebuff = false;
buff.canStack = false;
((Object)buff).name = "Discount Coffee";
buff.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
ContentAddition.AddBuffDef(buff);
}
public static void PurchaseInteraction_OnInteractionBegin(orig_OnInteractionBegin orig, PurchaseInteraction self, Interactor activator)
{
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Invalid comparison between Unknown and I4
orig.Invoke(self, activator);
if (NetworkServer.active && (int)self.costType == 1)
{
CharacterBody component = ((Component)activator).GetComponent<CharacterBody>();
int? obj;
if (component == null)
{
obj = null;
}
else
{
Inventory inventory = component.inventory;
obj = ((inventory != null) ? new int?(inventory.GetItemCount(def)) : null);
}
int? num = obj;
int valueOrDefault = num.GetValueOrDefault();
if (valueOrDefault > 0 && component != null)
{
component.AddTimedBuff(buff, 50f + (float)valueOrDefault * 10f);
}
}
}
public static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args)
{
if (sender.HasBuff(buff))
{
int? obj;
if (sender == null)
{
obj = null;
}
else
{
Inventory inventory = sender.inventory;
obj = ((inventory != null) ? new int?(inventory.GetItemCount(def)) : null);
}
int? num = obj;
int valueOrDefault = num.GetValueOrDefault();
args.attackSpeedMultAdd = (float)valueOrDefault * 0.15f;
args.sprintSpeedAdd = (float)valueOrDefault * 0.25f;
}
}
public static void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self)
{
orig.Invoke(self);
if (NetworkServer.active && Object.op_Implicit((Object)(object)self))
{
int? obj;
if (self == null)
{
obj = null;
}
else
{
Inventory inventory = self.inventory;
obj = ((inventory != null) ? new int?(inventory.GetItemCount(def)) : null);
}
int? num = obj;
int valueOrDefault = num.GetValueOrDefault();
self.AddItemBehavior<DiscountCoffeeBehavior>(valueOrDefault);
}
}
}
public class LooseCardsBehavior : ItemBehavior
{
public DotIndex dotIndex;
public void Awake()
{
((Behaviour)this).enabled = false;
}
private void OnEnable()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_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)
Array values = Enum.GetValues(typeof(DotIndex));
DotIndex val = (DotIndex)values.GetValue(Random.Range(0, values.Length - 2));
dotIndex = val;
}
private void OnDisabled()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
dotIndex = (DotIndex)(-1);
}
}
public static class LooseCards
{
[CompilerGenerated]
private static class <>O
{
public static hook_OnInventoryChanged <0>__CharacterBody_OnInventoryChanged;
public static hook_OnHitEnemy <1>__GlobalEventManager_OnHitEnemy;
}
public static ItemDef def;
public static void Awake()
{
//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_009a: 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_00b6: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Expected O, but got Unknown
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00dd: Expected O, but got Unknown
//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)
//IL_00f9: Expected O, but got Unknown
//IL_010e: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0119: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<ItemDef>();
def.canRemove = true;
((Object)def).name = "LOOSE_CARDS_NAME";
def.nameToken = "LOOSE_CARDS_NAME";
def.pickupToken = "LOOSE_CARDS_PICKUP";
def.descriptionToken = "LOOSE_CARDS_DESC";
def.loreToken = "LOOSE_CARDS_LORE";
def.tags = (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 };
def._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion();
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomItem(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
object obj = <>O.<0>__CharacterBody_OnInventoryChanged;
if (obj == null)
{
hook_OnInventoryChanged val = CharacterBody_OnInventoryChanged;
<>O.<0>__CharacterBody_OnInventoryChanged = val;
obj = (object)val;
}
CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)obj;
object obj2 = <>O.<1>__GlobalEventManager_OnHitEnemy;
if (obj2 == null)
{
hook_OnHitEnemy val2 = GlobalEventManager_OnHitEnemy;
<>O.<1>__GlobalEventManager_OnHitEnemy = val2;
obj2 = (object)val2;
}
GlobalEventManager.OnHitEnemy += (hook_OnHitEnemy)obj2;
}
public static void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim)
{
//IL_0078: 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: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: 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)
if (!damageInfo.rejected || !(damageInfo.procCoefficient <= 0f))
{
object obj;
if (damageInfo == null)
{
obj = null;
}
else
{
GameObject attacker = damageInfo.attacker;
obj = ((attacker != null) ? attacker.GetComponent<CharacterBody>() : null);
}
CharacterBody val = (CharacterBody)obj;
if ((Object)(object)val != (Object)null)
{
int itemCount = val.inventory.GetItemCount(def);
if (itemCount > 0 && Util.CheckRoll(2.5f + (float)itemCount * 2.5f, val.master))
{
DotIndex dotIndex = damageInfo.attacker.GetComponent<LooseCardsBehavior>().dotIndex;
InflictDotInfo val2 = default(InflictDotInfo);
val2.dotIndex = dotIndex;
val2.victimObject = victim;
val2.attackerObject = damageInfo.attacker;
val2.duration = 3f * damageInfo.procCoefficient;
InflictDotInfo val3 = val2;
DotController.InflictDot(ref val3);
}
}
}
orig.Invoke(self, damageInfo, victim);
}
public static void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self)
{
if (NetworkServer.active)
{
self.AddItemBehavior<LooseCardsBehavior>(self.inventory.GetItemCount(def));
}
orig.Invoke(self);
}
}
public static class MisterBoinky
{
public class MisterBoinkyBehavior : ItemBehavior, IOnIncomingDamageServerReceiver
{
public void Awake()
{
((Behaviour)this).enabled = false;
}
public void OnIncomingDamageServer(DamageInfo damageInfo)
{
if (damageInfo != null && !damageInfo.rejected)
{
CharacterBody component = ((Component)this).GetComponent<CharacterBody>();
HealthComponent healthComponent = component.healthComponent;
if (!((Object)(object)healthComponent == (Object)null) && !((Object)(object)component == (Object)null) && damageInfo.damage / healthComponent.fullCombinedHealth > 0.25f)
{
damageInfo.rejected = true;
component.inventory.RemoveItem(def, 1);
component.inventory.GiveItem(Consumed.def, 1);
}
}
}
private void OnEnable()
{
if (Object.op_Implicit((Object)(object)base.body.healthComponent) && Array.IndexOf(base.body.healthComponent.onIncomingDamageReceivers, (IOnIncomingDamageServerReceiver)(object)this) == -1)
{
ref IOnIncomingDamageServerReceiver[] onIncomingDamageReceivers = ref base.body.healthComponent.onIncomingDamageReceivers;
IOnIncomingDamageServerReceiver val = (IOnIncomingDamageServerReceiver)(object)this;
ArrayUtils.ArrayAppend<IOnIncomingDamageServerReceiver>(ref onIncomingDamageReceivers, ref val);
}
}
private void OnDisable()
{
if (!((Object)(object)base.body == (Object)null) && !((Object)(object)base.body.healthComponent == (Object)null) && Array.IndexOf(base.body.healthComponent.onIncomingDamageReceivers, (IOnIncomingDamageServerReceiver)(object)this) > -1)
{
base.body.healthComponent.onIncomingDamageReceivers = base.body.healthComponent.onIncomingDamageReceivers.Where((IOnIncomingDamageServerReceiver val) => val != this).ToArray();
}
}
}
public static class Consumed
{
public static ItemDef def;
public static void Awake()
{
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: 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_009e: Unknown result type (might be due to invalid IL or missing references)
//IL_00aa: Expected O, but got Unknown
//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)
//IL_00d0: 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)
//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Expected O, but got Unknown
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_00f7: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<ItemDef>();
def.canRemove = false;
((Object)def).name = "MISTERBOINKY_USED_NAME";
def.nameToken = "MISTERBOINKY_USED_NAME";
def.pickupToken = "MISTERBOINKY_USED_PICKUP";
def.descriptionToken = "MISTERBOINKY_USED_DESC";
def.loreToken = "";
def.tier = (ItemTier)5;
ItemDef obj = def;
ItemTag[] array = new ItemTag[6];
RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
obj.tags = (ItemTag[])(object)array;
def._itemTierDef = new ItemTierDef
{
isDroppable = false,
canScrap = false,
tier = (ItemTier)5
};
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomItem(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
}
}
[CompilerGenerated]
private static class <>O
{
public static hook_OnInventoryChanged <0>__CharacterBody_OnInventoryChanged;
}
public static ItemDef def;
public static void Awake()
{
//IL_006f: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: 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_0090: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Expected O, but got Unknown
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Expected O, but got Unknown
//IL_00df: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Expected O, but got Unknown
Consumed.Awake();
def = ScriptableObject.CreateInstance<ItemDef>();
def.canRemove = true;
((Object)def).name = "MISTERBOINKY_NAME";
def.nameToken = "MISTERBOINKY_NAME";
def.pickupToken = "MISTERBOINKY_PICKUP";
def.descriptionToken = "MISTERBOINKY_DESC";
def.loreToken = "MISTERBOINKY_LORE";
def._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/Tier1Def.asset").WaitForCompletion();
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomItem(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
object obj = <>O.<0>__CharacterBody_OnInventoryChanged;
if (obj == null)
{
hook_OnInventoryChanged val = CharacterBody_OnInventoryChanged;
<>O.<0>__CharacterBody_OnInventoryChanged = val;
obj = (object)val;
}
CharacterBody.OnInventoryChanged += (hook_OnInventoryChanged)obj;
}
private static void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self)
{
if (NetworkServer.active)
{
self.AddItemBehavior<MisterBoinkyBehavior>(self.inventory.GetItemCount(def));
}
orig.Invoke(self);
}
}
}
namespace Krod.Equipment
{
[StructLayout(LayoutKind.Sequential, Size = 1)]
public struct ScrappableSearchFilter : IGenericDirectionalSearchFilter<GenericPickupController>
{
public static PickupIndex whiteScrap = PickupCatalog.FindPickupIndex("ItemIndex.ScrapWhite");
public static PickupIndex greenScrap = PickupCatalog.FindPickupIndex("ItemIndex.ScrapGreen");
public static PickupIndex redScrap = PickupCatalog.FindPickupIndex("ItemIndex.ScrapRed");
public static PickupIndex yellowScrap = PickupCatalog.FindPickupIndex("ItemIndex.ScrapYellow");
public bool PassesFilter(GenericPickupController candidateInfo)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//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_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0021: 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_003a: 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_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
PickupDef pickupDef = PickupCatalog.GetPickupDef(candidateInfo.pickupIndex);
PickupIndex pickupIndex = pickupDef.pickupIndex;
if (pickupIndex == whiteScrap || pickupIndex == greenScrap || pickupIndex == redScrap || pickupIndex == yellowScrap)
{
return false;
}
return PickupCatalog.FindScrapIndexForItemTier(pickupDef.itemTier) != PickupIndex.none;
}
}
public class ScrappableSearch : BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>
{
public ScrappableSearch(PickupSearchSelector selector, ScrappableSearchFilter candidateFilter)
: base(selector, candidateFilter)
{
}//IL_0001: Unknown result type (might be due to invalid IL or missing references)
}
public class AileensGlassEye
{
public class AileensGlassEyeCracked
{
[CompilerGenerated]
private static class <>O
{
public static hook_PerformEquipmentAction <0>__EquipmentSlot_PerformEquipmentAction1;
public static hook_UpdateTargets <1>__EquipmentSlot_UpdateTargets;
}
public static EquipmentDef def;
public static GameObject visualizerPrefab;
public static void Awake()
{
//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_0095: 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_00ac: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ce: Expected O, but got Unknown
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Expected O, but got Unknown
//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Expected O, but got Unknown
//IL_0104: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_010f: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<EquipmentDef>();
((Object)def).name = "AILEENS_EYE_CRACKED_NAME";
def.nameToken = "AILEENS_EYE_CRACKED_NAME";
def.pickupToken = "AILEENS_EYE_CRACKED_PICKUP";
def.descriptionToken = "AILEENS_EYE_CRACKED_DESC";
def.loreToken = "AILEENS_EYE_CRACKED_LORE";
def.cooldown = 60f;
def.canDrop = false;
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
visualizerPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Recycle/RecyclerIndicator.prefab").WaitForCompletion();
ItemAPI.Add(new CustomEquipment(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
object obj = <>O.<0>__EquipmentSlot_PerformEquipmentAction1;
if (obj == null)
{
hook_PerformEquipmentAction val = EquipmentSlot_PerformEquipmentAction1;
<>O.<0>__EquipmentSlot_PerformEquipmentAction1 = val;
obj = (object)val;
}
EquipmentSlot.PerformEquipmentAction += (hook_PerformEquipmentAction)obj;
object obj2 = <>O.<1>__EquipmentSlot_UpdateTargets;
if (obj2 == null)
{
hook_UpdateTargets val2 = EquipmentSlot_UpdateTargets;
<>O.<1>__EquipmentSlot_UpdateTargets = val2;
obj2 = (object)val2;
}
EquipmentSlot.UpdateTargets += (hook_UpdateTargets)obj2;
}
public static void EquipmentSlot_UpdateTargets(orig_UpdateTargets orig, EquipmentSlot self, EquipmentIndex targetingEquipmentIndex, bool userShouldAnticipateTarget)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_011b: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0018: 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_0030: 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)
//IL_003e: 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_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: 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_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
if (targetingEquipmentIndex == def.equipmentIndex)
{
ScrappableSearch scrappableSearch = new ScrappableSearch(default(PickupSearchSelector), default(ScrappableSearchFilter));
Ray val = self.GetAimRay();
float num = default(float);
val = CameraRigController.ModifyAimRayIfApplicable(val, ((Component)self).gameObject, ref num);
((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).searchOrigin = ((Ray)(ref val)).origin;
((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).searchDirection = ((Ray)(ref val)).direction;
((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).minAngleFilter = 0f;
((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).maxAngleFilter = 10f;
((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).minDistanceFilter = 0f;
((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).maxDistanceFilter = 30f + num;
((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).filterByDistinctEntity = false;
((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).filterByLoS = true;
((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).sortMode = (SortMode)3;
GenericPickupController val2 = ((BaseDirectionalSearch<GenericPickupController, PickupSearchSelector, ScrappableSearchFilter>)scrappableSearch).SearchCandidatesForSingleTarget<List<GenericPickupController>>(InstanceTracker.GetInstancesList<GenericPickupController>());
UserTargetInfo currentTarget = default(UserTargetInfo);
((UserTargetInfo)(ref currentTarget))..ctor(val2);
self.currentTarget = currentTarget;
if (Object.op_Implicit((Object)(object)self.currentTarget.transformToIndicateAt))
{
self.targetIndicator.visualizerPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/RecyclerIndicator");
self.targetIndicator.active = true;
self.targetIndicator.targetTransform = self.currentTarget.transformToIndicateAt;
}
else
{
self.targetIndicator.active = false;
self.targetIndicator.targetTransform = null;
}
}
else
{
orig.Invoke(self, targetingEquipmentIndex, userShouldAnticipateTarget);
}
}
public static bool EquipmentSlot_PerformEquipmentAction1(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
{
//IL_003b: 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)
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)equipmentDef == (Object)(object)def && Object.op_Implicit((Object)(object)self.currentTarget.transformToIndicateAt))
{
_ = self.currentTarget.rootObject.transform;
PickupIndex val = PickupCatalog.FindScrapIndexForItemTier(PickupCatalog.GetPickupDef(self.currentTarget.pickupController.pickupIndex).itemTier);
if (NetworkServer.active)
{
self.currentTarget.pickupController.SyncPickupIndex(val);
}
return true;
}
return orig.Invoke(self, equipmentDef);
}
}
[CompilerGenerated]
private static class <>O
{
public static hook_PerformEquipmentAction <0>__EquipmentSlot_PerformEquipmentAction;
}
public static EquipmentDef def;
public static InteractableSpawnCard isc;
public static void Awake()
{
//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_009a: 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_00b1: Unknown result type (might be due to invalid IL or missing references)
//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00d3: Expected O, but got Unknown
//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
//IL_00d8: Expected O, but got Unknown
//IL_00e9: 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_00f4: Expected O, but got Unknown
AileensGlassEyeCracked.Awake();
def = ScriptableObject.CreateInstance<EquipmentDef>();
((Object)def).name = "AILEENS_EYE_NAME";
def.nameToken = "AILEENS_EYE_NAME";
def.pickupToken = "AILEENS_EYE_PICKUP";
def.descriptionToken = "AILEENS_EYE_DESC";
def.loreToken = "AILEENS_EYE_LORE";
def.cooldown = 60f;
def.canDrop = true;
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
isc = Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"RoR2/Base/Scrapper/iscScrapper.asset").WaitForCompletion();
ItemAPI.Add(new CustomEquipment(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
object obj = <>O.<0>__EquipmentSlot_PerformEquipmentAction;
if (obj == null)
{
hook_PerformEquipmentAction val = EquipmentSlot_PerformEquipmentAction;
<>O.<0>__EquipmentSlot_PerformEquipmentAction = val;
obj = (object)val;
}
EquipmentSlot.PerformEquipmentAction += (hook_PerformEquipmentAction)obj;
}
private static bool EquipmentSlot_PerformEquipmentAction(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
{
//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_002c: 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_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Expected O, but got Unknown
//IL_0050: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Expected O, but got Unknown
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)equipmentDef == (Object)(object)def)
{
CharacterBody val = ((self != null) ? self.characterBody : null);
if ((Object)(object)val == (Object)null)
{
return true;
}
DirectorPlacementRule val2 = new DirectorPlacementRule
{
placementMode = (PlacementMode)3,
preventOverhead = true,
spawnOnTarget = val.coreTransform
};
DirectorSpawnRequest val3 = new DirectorSpawnRequest((SpawnCard)(object)isc, val2, RoR2Application.rng);
DirectorCore.instance.TrySpawnObject(val3);
val.inventory.SetEquipmentIndex(AileensGlassEyeCracked.def.equipmentIndex);
return true;
}
return orig.Invoke(self, equipmentDef);
}
}
public class JeffsServiceMedal
{
[CompilerGenerated]
private static class <>O
{
public static hook_PerformEquipmentAction <0>__EquipmentSlot_PerformEquipmentAction;
public static hook_GetDeployableSameSlotLimit <1>__CharacterMaster_GetDeployableSameSlotLimit;
}
public static EquipmentDef def;
public static void Awake()
{
//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_0095: 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_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Expected O, but got Unknown
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Expected O, but got Unknown
//IL_00cd: 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_00d8: Expected O, but got Unknown
//IL_00ed: 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_00f8: Expected O, but got Unknown
def = ScriptableObject.CreateInstance<EquipmentDef>();
((Object)def).name = "JEFFS_SERVICE_NAME";
def.nameToken = "JEFFS_SERVICE_NAME";
def.pickupToken = "JEFFS_SERVICE_PICKUP";
def.descriptionToken = "JEFFS_SERVICE_DESC";
def.loreToken = "JEFFS_SERVICE_LORE";
def.cooldown = 180f;
def.canDrop = true;
def.pickupIconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
def.pickupModelPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion();
ItemAPI.Add(new CustomEquipment(def, new ItemDisplayRuleDict((ItemDisplayRule[])null)));
object obj = <>O.<0>__EquipmentSlot_PerformEquipmentAction;
if (obj == null)
{
hook_PerformEquipmentAction val = EquipmentSlot_PerformEquipmentAction;
<>O.<0>__EquipmentSlot_PerformEquipmentAction = val;
obj = (object)val;
}
EquipmentSlot.PerformEquipmentAction += (hook_PerformEquipmentAction)obj;
object obj2 = <>O.<1>__CharacterMaster_GetDeployableSameSlotLimit;
if (obj2 == null)
{
hook_GetDeployableSameSlotLimit val2 = CharacterMaster_GetDeployableSameSlotLimit;
<>O.<1>__CharacterMaster_GetDeployableSameSlotLimit = val2;
obj2 = (object)val2;
}
CharacterMaster.GetDeployableSameSlotLimit += (hook_GetDeployableSameSlotLimit)obj2;
}
private static int CharacterMaster_GetDeployableSameSlotLimit(orig_GetDeployableSameSlotLimit orig, CharacterMaster self, DeployableSlot slot)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
//IL_0003: Invalid comparison between Unknown and I4
//IL_0047: 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_002e: 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)
if ((int)slot == 20)
{
int num = self.inventory.GetItemCount(Items.MinorConstructOnKill) * 4;
if (self.inventory.GetEquipment((uint)self.inventory.activeEquipmentSlot).equipmentIndex == def.equipmentIndex)
{
num += 4;
}
return num;
}
return orig.Invoke(self, slot);
}
private static bool EquipmentSlot_PerformEquipmentAction(orig_PerformEquipmentAction orig, EquipmentSlot self, EquipmentDef equipmentDef)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: 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_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: 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)
//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_006f: 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_0082: 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_0091: 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_00ad: 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_00bc: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: 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_00ef: 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_00fb: 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)
//IL_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0148: 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)
if (equipmentDef.equipmentIndex == def.equipmentIndex)
{
Transform transform = self.characterBody.transform;
for (int i = 0; i < 4; i++)
{
Vector3 val = default(Vector3);
switch (i)
{
case 0:
val = transform.forward * 20f;
break;
case 1:
val = transform.forward * -20f;
break;
case 2:
val = transform.right * 20f;
break;
case 3:
val = transform.right * -20f;
break;
}
Vector3 val2 = Quaternion.AngleAxis((float)Random.Range(0, 360), Vector3.up) * Quaternion.AngleAxis(-80f, Vector3.right) * Vector3.forward;
FireProjectileInfo val3 = default(FireProjectileInfo);
val3.projectilePrefab = CommonAssets.minorConstructOnKillProjectile;
val3.position = transform.position + transform.forward + val;
val3.rotation = Util.QuaternionSafeLookRotation(val2);
val3.procChainMask = default(ProcChainMask);
val3.owner = ((Component)self.characterBody).gameObject;
val3.damage = 0f;
val3.crit = false;
val3.force = 0f;
val3.damageColorIndex = (DamageColorIndex)3;
ProjectileManager.instance.FireProjectile(val3);
}
return true;
}
return orig.Invoke(self, equipmentDef);
}
}
}
namespace Krod.Buffs
{
public static class Defs
{
public static BuffDef TimIsOnFire;
public static void Awake()
{
//IL_003f: 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_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
TimIsOnFire = ScriptableObject.CreateInstance<BuffDef>();
TimIsOnFire.canStack = false;
TimIsOnFire.isDebuff = false;
TimIsOnFire.isCooldown = false;
((Object)TimIsOnFire).name = "TimIsOnFire";
TimIsOnFire.buffColor = Color.white;
TimIsOnFire.iconSprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion();
if (!ContentAddition.AddBuffDef(TimIsOnFire))
{
Log.Error("Could not add buff def");
}
}
}
}