using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using Microsoft.CodeAnalysis;
using On.RoR2;
using RoR2;
using UnityEngine;
using UnityEngine.Networking;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ImprovedChefsKiss")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ImprovedChefsKiss")]
[assembly: AssemblyTitle("ImprovedChefsKiss")]
[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 ImprovedChefsKiss
{
[BepInPlugin("Tero.ImprovedChefsKiss", "ImprovedChefsKiss", "1.0.3")]
public class ImprovedChefsKiss : BaseUnityPlugin
{
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static hook_OnCharacterDeath <>9__14_0;
public static hook_RecalculateStats <>9__14_1;
public static hook_OnTriggerStay <>9__14_2;
internal void <Awake>b__14_0(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
{
//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_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: 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_0267: Unknown result type (might be due to invalid IL or missing references)
//IL_0269: Unknown result type (might be due to invalid IL or missing references)
//IL_0297: Unknown result type (might be due to invalid IL or missing references)
//IL_0324: Unknown result type (might be due to invalid IL or missing references)
CharacterBody victimBody = damageReport.victimBody;
CharacterBody attackerBody = damageReport.attackerBody;
TeamIndex attackerTeamIndex = damageReport.attackerTeamIndex;
DamageInfo damageInfo = damageReport.damageInfo;
GameObject val = null;
if (Object.op_Implicit((Object)(object)damageReport.victim))
{
val = ((Component)damageReport.victim).gameObject;
}
Vector3 val2 = Vector3.zero;
Transform val3 = null;
if ((Object)(object)val != (Object)null)
{
val3 = val.transform;
}
if ((Object)(object)val3 != (Object)null)
{
val2 = val3.position;
}
if ((Object)(object)attackerBody != (Object)null)
{
if (attackerBody.HasBuff(Buffs.CookingRolling))
{
victimBody.AddBuff(Buffs.CookingRolled);
}
if (attackerBody.HasBuff(Buffs.CookingSearing))
{
victimBody.AddBuff(Buffs.CookingRoasted);
}
float num = 0f;
float num2 = 0f;
float num3 = 0f;
float num4 = 0f;
if (victimBody.HasBuff(Buffs.CookingChopped))
{
num += 1f;
num2 += 2f;
num3 += 0.04f;
num4 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingChopped);
}
if (victimBody.HasBuff(Buffs.CookingOiled))
{
num += 1f;
num2 += 2f;
num3 += 0.04f;
num4 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingOiled);
}
if (victimBody.HasBuff(Buffs.CookingRoasted))
{
num += 1f;
num2 += 2f;
num3 += 0.04f;
num4 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingRoasted);
}
if (victimBody.HasBuff(Buffs.CookingRolled))
{
num += 1f;
num2 += 2f;
num3 += 0.04f;
num4 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingRolled);
}
if (victimBody.HasBuff(Buffs.CookingFlambe))
{
num += 1f;
num2 += 2f;
num3 += 0.04f;
num4 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingFlambe);
}
if (num > 1f)
{
GameObject val4 = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Chef/ChefFoodPickup"), val2, Random.rotation);
ChefFoodPickController component = val4.GetComponent<ChefFoodPickController>();
TeamFilter component2 = val4.GetComponent<TeamFilter>();
if (Object.op_Implicit((Object)(object)component2))
{
component2.teamIndex = attackerTeamIndex;
}
HealthPickup componentInChildren = val4.GetComponentInChildren<HealthPickup>();
if (Object.op_Implicit((Object)(object)componentInChildren))
{
componentInChildren.flatHealing = num2;
componentInChildren.fractionalHealing = num3;
if (num >= 3f)
{
componentInChildren.flatHealing *= -1f;
}
if (num >= 4f)
{
componentInChildren.fractionalHealing *= -1f;
}
}
val4.transform.localScale = new Vector3(num4, num4, num4);
if (num <= 2f)
{
component.foodModel1.SetActive(false);
component.foodModel2.SetActive(true);
component.foodModel3.SetActive(false);
MeshRenderer component3 = component.foodModel1.GetComponent<MeshRenderer>();
((Renderer)component3).enabled = false;
}
if (num == 3f)
{
component.foodModel1.SetActive(true);
component.foodModel2.SetActive(false);
component.foodModel3.SetActive(false);
MeshRenderer component4 = component.foodModel2.GetComponent<MeshRenderer>();
((Renderer)component4).enabled = false;
}
if (num >= 4f)
{
component.foodModel1.SetActive(false);
component.foodModel2.SetActive(false);
component.foodModel3.SetActive(true);
MeshRenderer component5 = component.foodModel1.GetComponent<MeshRenderer>();
((Renderer)component5).enabled = false;
MeshRenderer component6 = component.foodModel2.GetComponent<MeshRenderer>();
((Renderer)component6).enabled = false;
}
NetworkServer.Spawn(val4);
}
}
orig.Invoke(self, damageReport);
}
internal void <Awake>b__14_1(orig_RecalculateStats orig, CharacterBody self)
{
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Invalid comparison between Unknown and I4
float num = 0f;
float num2 = 0f;
if (Object.op_Implicit((Object)(object)self.healthComponent))
{
num = self.healthComponent.Networkhealth;
num2 = self.maxHealth;
}
orig.Invoke(self);
if ((int)self.teamComponent.teamIndex == 1 && !NetworkServer.active && Object.op_Implicit((Object)(object)self.healthComponent) && num2 == self.maxHealth && num > self.maxHealth)
{
if (Object.op_Implicit((Object)(object)self.inventory))
{
int num3 = (int)(num - self.maxHealth);
Inventory inventory = self.inventory;
inventory.beadAppliedHealth += (float)num3;
self.healthComponent.Networkhealth = num;
}
orig.Invoke(self);
}
}
internal void <Awake>b__14_2(orig_OnTriggerStay orig, HealthPickup self, Collider other)
{
//IL_0016: 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_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_039d: Unknown result type (might be due to invalid IL or missing references)
//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
//IL_03ac: Invalid comparison between Unknown and I4
//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_0229: Unknown result type (might be due to invalid IL or missing references)
//IL_0238: Unknown result type (might be due to invalid IL or missing references)
//IL_023d: Unknown result type (might be due to invalid IL or missing references)
//IL_024a: Unknown result type (might be due to invalid IL or missing references)
//IL_025b: Expected O, but got Unknown
//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
//IL_02da: Unknown result type (might be due to invalid IL or missing references)
//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
//IL_02de: Unknown result type (might be due to invalid IL or missing references)
//IL_02e4: Invalid comparison between Unknown and I4
//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
//IL_02fc: Unknown result type (might be due to invalid IL or missing references)
//IL_030a: Unknown result type (might be due to invalid IL or missing references)
//IL_030c: Unknown result type (might be due to invalid IL or missing references)
//IL_0316: Unknown result type (might be due to invalid IL or missing references)
if (NetworkServer.active && self.alive && TeamComponent.GetObjectTeam(((Component)other).gameObject) == self.teamFilter.teamIndex)
{
CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
if (Object.op_Implicit((Object)(object)component))
{
HealthComponent healthComponent = component.healthComponent;
if (Object.op_Implicit((Object)(object)healthComponent) && self.flatHealing < 0f)
{
self.flatHealing *= -1f;
healthComponent.AddBarrier(healthComponent.fullCombinedHealth * 0.3f);
if (BoostHealth && Object.op_Implicit((Object)(object)component.inventory))
{
Inventory inventory = component.inventory;
inventory.beadAppliedHealth += 1f;
component.RecalculateStats();
((NetworkBehaviour)component).SetDirtyBit(4u);
component.inventory.HandleInventoryChanged();
}
}
if (self.fractionalHealing < 0f)
{
self.fractionalHealing *= -1f;
if (HealTeam)
{
foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers(self.teamFilter.teamIndex))
{
HealthComponent healthComponent2 = teamMember.body.healthComponent;
if (!((Object)(object)teamMember.body != (Object)(object)component) || !Object.op_Implicit((Object)(object)healthComponent2) || !healthComponent2.alive)
{
continue;
}
healthComponent2.AddBarrier(healthComponent2.fullCombinedHealth * 0.3f);
if (BoostHealth && Object.op_Implicit((Object)(object)teamMember.body.inventory))
{
Inventory inventory2 = teamMember.body.inventory;
inventory2.beadAppliedHealth += 1f;
teamMember.body.RecalculateStats();
((NetworkBehaviour)teamMember.body).SetDirtyBit(4u);
teamMember.body.inventory.HandleInventoryChanged();
}
healthComponent2.Heal(self.flatHealing + healthComponent2.fullHealth * self.fractionalHealing, default(ProcChainMask), true);
EffectManager.SpawnEffect(self.pickupEffect, new EffectData
{
origin = teamMember.body.transform.position
}, true);
if (Object.op_Implicit((Object)(object)teamMember.body.skillLocator))
{
teamMember.body.skillLocator.ResetSkills();
}
if (Object.op_Implicit((Object)(object)teamMember.body.equipmentSlot) && Object.op_Implicit((Object)(object)teamMember.body.inventory))
{
EquipmentState equipment = teamMember.body.inventory.GetEquipment((uint)teamMember.body.inventory.activeEquipmentSlot);
if ((int)equipment.equipmentIndex != -1 && ((EquipmentState)(ref equipment)).isPerfomingRecharge)
{
FixedTimeStamp now = FixedTimeStamp.now;
teamMember.body.inventory.DeductActiveEquipmentCooldown((equipment.chargeFinishTime.t - now.t) / 2f);
}
}
}
}
if (Object.op_Implicit((Object)(object)component.skillLocator))
{
component.skillLocator.ResetSkills();
}
if (Object.op_Implicit((Object)(object)component.equipmentSlot) && Object.op_Implicit((Object)(object)component.inventory))
{
EquipmentState equipment2 = component.inventory.GetEquipment((uint)component.inventory.activeEquipmentSlot);
if ((int)equipment2.equipmentIndex != -1 && ((EquipmentState)(ref equipment2)).isPerfomingRecharge)
{
FixedTimeStamp now2 = FixedTimeStamp.now;
component.inventory.DeductActiveEquipmentCooldown((equipment2.chargeFinishTime.t - now2.t) / 2f);
}
}
}
}
}
orig.Invoke(self, other);
}
}
public const string PluginGUID = "Tero.ImprovedChefsKiss";
public const string PluginAuthor = "Tero";
public const string PluginName = "ImprovedChefsKiss";
public const string PluginVersion = "1.0.3";
public static bool HealTeam;
public static bool BoostHealth;
public static ConfigEntry<bool> Feast { get; set; }
public static ConfigEntry<bool> Nutrition { get; set; }
public void Awake()
{
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_009f: Expected O, but got Unknown
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c4: 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_00e9: Expected O, but got Unknown
Log.Init(((BaseUnityPlugin)this).Logger);
try
{
Nutrition = ((BaseUnityPlugin)this).Config.Bind<bool>("ImprovedChefsKiss", "Nutrition", false, "Level 3 food also gives +1 max hp");
BoostHealth = Nutrition.Value;
}
catch (Exception)
{
}
try
{
Feast = ((BaseUnityPlugin)this).Config.Bind<bool>("ImprovedChefsKiss", "Feast", false, "Level 4 food affects the entire team");
HealTeam = Feast.Value;
}
catch (Exception)
{
}
object obj = <>c.<>9__14_0;
if (obj == null)
{
hook_OnCharacterDeath val = delegate(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport)
{
//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_0040: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: 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_0267: Unknown result type (might be due to invalid IL or missing references)
//IL_0269: Unknown result type (might be due to invalid IL or missing references)
//IL_0297: Unknown result type (might be due to invalid IL or missing references)
//IL_0324: Unknown result type (might be due to invalid IL or missing references)
CharacterBody victimBody = damageReport.victimBody;
CharacterBody attackerBody = damageReport.attackerBody;
TeamIndex attackerTeamIndex = damageReport.attackerTeamIndex;
DamageInfo damageInfo = damageReport.damageInfo;
GameObject val4 = null;
if (Object.op_Implicit((Object)(object)damageReport.victim))
{
val4 = ((Component)damageReport.victim).gameObject;
}
Vector3 val5 = Vector3.zero;
Transform val6 = null;
if ((Object)(object)val4 != (Object)null)
{
val6 = val4.transform;
}
if ((Object)(object)val6 != (Object)null)
{
val5 = val6.position;
}
if ((Object)(object)attackerBody != (Object)null)
{
if (attackerBody.HasBuff(Buffs.CookingRolling))
{
victimBody.AddBuff(Buffs.CookingRolled);
}
if (attackerBody.HasBuff(Buffs.CookingSearing))
{
victimBody.AddBuff(Buffs.CookingRoasted);
}
float num4 = 0f;
float num5 = 0f;
float num6 = 0f;
float num7 = 0f;
if (victimBody.HasBuff(Buffs.CookingChopped))
{
num4 += 1f;
num5 += 2f;
num6 += 0.04f;
num7 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingChopped);
}
if (victimBody.HasBuff(Buffs.CookingOiled))
{
num4 += 1f;
num5 += 2f;
num6 += 0.04f;
num7 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingOiled);
}
if (victimBody.HasBuff(Buffs.CookingRoasted))
{
num4 += 1f;
num5 += 2f;
num6 += 0.04f;
num7 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingRoasted);
}
if (victimBody.HasBuff(Buffs.CookingRolled))
{
num4 += 1f;
num5 += 2f;
num6 += 0.04f;
num7 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingRolled);
}
if (victimBody.HasBuff(Buffs.CookingFlambe))
{
num4 += 1f;
num5 += 2f;
num6 += 0.04f;
num7 += 0.75f;
victimBody.RemoveBuff(Buffs.CookingFlambe);
}
if (num4 > 1f)
{
GameObject val7 = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Chef/ChefFoodPickup"), val5, Random.rotation);
ChefFoodPickController component2 = val7.GetComponent<ChefFoodPickController>();
TeamFilter component3 = val7.GetComponent<TeamFilter>();
if (Object.op_Implicit((Object)(object)component3))
{
component3.teamIndex = attackerTeamIndex;
}
HealthPickup componentInChildren = val7.GetComponentInChildren<HealthPickup>();
if (Object.op_Implicit((Object)(object)componentInChildren))
{
componentInChildren.flatHealing = num5;
componentInChildren.fractionalHealing = num6;
if (num4 >= 3f)
{
componentInChildren.flatHealing *= -1f;
}
if (num4 >= 4f)
{
componentInChildren.fractionalHealing *= -1f;
}
}
val7.transform.localScale = new Vector3(num7, num7, num7);
if (num4 <= 2f)
{
component2.foodModel1.SetActive(false);
component2.foodModel2.SetActive(true);
component2.foodModel3.SetActive(false);
MeshRenderer component4 = component2.foodModel1.GetComponent<MeshRenderer>();
((Renderer)component4).enabled = false;
}
if (num4 == 3f)
{
component2.foodModel1.SetActive(true);
component2.foodModel2.SetActive(false);
component2.foodModel3.SetActive(false);
MeshRenderer component5 = component2.foodModel2.GetComponent<MeshRenderer>();
((Renderer)component5).enabled = false;
}
if (num4 >= 4f)
{
component2.foodModel1.SetActive(false);
component2.foodModel2.SetActive(false);
component2.foodModel3.SetActive(true);
MeshRenderer component6 = component2.foodModel1.GetComponent<MeshRenderer>();
((Renderer)component6).enabled = false;
MeshRenderer component7 = component2.foodModel2.GetComponent<MeshRenderer>();
((Renderer)component7).enabled = false;
}
NetworkServer.Spawn(val7);
}
}
orig.Invoke(self, damageReport);
};
<>c.<>9__14_0 = val;
obj = (object)val;
}
GlobalEventManager.OnCharacterDeath += (hook_OnCharacterDeath)obj;
object obj2 = <>c.<>9__14_1;
if (obj2 == null)
{
hook_RecalculateStats val2 = delegate(orig_RecalculateStats orig, CharacterBody self)
{
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_0045: Invalid comparison between Unknown and I4
float num = 0f;
float num2 = 0f;
if (Object.op_Implicit((Object)(object)self.healthComponent))
{
num = self.healthComponent.Networkhealth;
num2 = self.maxHealth;
}
orig.Invoke(self);
if ((int)self.teamComponent.teamIndex == 1 && !NetworkServer.active && Object.op_Implicit((Object)(object)self.healthComponent) && num2 == self.maxHealth && num > self.maxHealth)
{
if (Object.op_Implicit((Object)(object)self.inventory))
{
int num3 = (int)(num - self.maxHealth);
Inventory inventory3 = self.inventory;
inventory3.beadAppliedHealth += (float)num3;
self.healthComponent.Networkhealth = num;
}
orig.Invoke(self);
}
};
<>c.<>9__14_1 = val2;
obj2 = (object)val2;
}
CharacterBody.RecalculateStats += (hook_RecalculateStats)obj2;
object obj3 = <>c.<>9__14_2;
if (obj3 == null)
{
hook_OnTriggerStay val3 = delegate(orig_OnTriggerStay orig, HealthPickup self, Collider other)
{
//IL_0016: 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_012b: Unknown result type (might be due to invalid IL or missing references)
//IL_039d: Unknown result type (might be due to invalid IL or missing references)
//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
//IL_03ac: Invalid comparison between Unknown and I4
//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_0229: Unknown result type (might be due to invalid IL or missing references)
//IL_0238: Unknown result type (might be due to invalid IL or missing references)
//IL_023d: Unknown result type (might be due to invalid IL or missing references)
//IL_024a: Unknown result type (might be due to invalid IL or missing references)
//IL_025b: Expected O, but got Unknown
//IL_02d5: Unknown result type (might be due to invalid IL or missing references)
//IL_02da: Unknown result type (might be due to invalid IL or missing references)
//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
//IL_02de: Unknown result type (might be due to invalid IL or missing references)
//IL_02e4: Invalid comparison between Unknown and I4
//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
//IL_02fc: Unknown result type (might be due to invalid IL or missing references)
//IL_030a: Unknown result type (might be due to invalid IL or missing references)
//IL_030c: Unknown result type (might be due to invalid IL or missing references)
//IL_0316: Unknown result type (might be due to invalid IL or missing references)
if (NetworkServer.active && self.alive && TeamComponent.GetObjectTeam(((Component)other).gameObject) == self.teamFilter.teamIndex)
{
CharacterBody component = ((Component)other).GetComponent<CharacterBody>();
if (Object.op_Implicit((Object)(object)component))
{
HealthComponent healthComponent = component.healthComponent;
if (Object.op_Implicit((Object)(object)healthComponent) && self.flatHealing < 0f)
{
self.flatHealing *= -1f;
healthComponent.AddBarrier(healthComponent.fullCombinedHealth * 0.3f);
if (BoostHealth && Object.op_Implicit((Object)(object)component.inventory))
{
Inventory inventory = component.inventory;
inventory.beadAppliedHealth += 1f;
component.RecalculateStats();
((NetworkBehaviour)component).SetDirtyBit(4u);
component.inventory.HandleInventoryChanged();
}
}
if (self.fractionalHealing < 0f)
{
self.fractionalHealing *= -1f;
if (HealTeam)
{
foreach (TeamComponent teamMember in TeamComponent.GetTeamMembers(self.teamFilter.teamIndex))
{
HealthComponent healthComponent2 = teamMember.body.healthComponent;
if ((Object)(object)teamMember.body != (Object)(object)component && Object.op_Implicit((Object)(object)healthComponent2) && healthComponent2.alive)
{
healthComponent2.AddBarrier(healthComponent2.fullCombinedHealth * 0.3f);
if (BoostHealth && Object.op_Implicit((Object)(object)teamMember.body.inventory))
{
Inventory inventory2 = teamMember.body.inventory;
inventory2.beadAppliedHealth += 1f;
teamMember.body.RecalculateStats();
((NetworkBehaviour)teamMember.body).SetDirtyBit(4u);
teamMember.body.inventory.HandleInventoryChanged();
}
healthComponent2.Heal(self.flatHealing + healthComponent2.fullHealth * self.fractionalHealing, default(ProcChainMask), true);
EffectManager.SpawnEffect(self.pickupEffect, new EffectData
{
origin = teamMember.body.transform.position
}, true);
if (Object.op_Implicit((Object)(object)teamMember.body.skillLocator))
{
teamMember.body.skillLocator.ResetSkills();
}
if (Object.op_Implicit((Object)(object)teamMember.body.equipmentSlot) && Object.op_Implicit((Object)(object)teamMember.body.inventory))
{
EquipmentState equipment = teamMember.body.inventory.GetEquipment((uint)teamMember.body.inventory.activeEquipmentSlot);
if ((int)equipment.equipmentIndex != -1 && ((EquipmentState)(ref equipment)).isPerfomingRecharge)
{
FixedTimeStamp now = FixedTimeStamp.now;
teamMember.body.inventory.DeductActiveEquipmentCooldown((equipment.chargeFinishTime.t - now.t) / 2f);
}
}
}
}
}
if (Object.op_Implicit((Object)(object)component.skillLocator))
{
component.skillLocator.ResetSkills();
}
if (Object.op_Implicit((Object)(object)component.equipmentSlot) && Object.op_Implicit((Object)(object)component.inventory))
{
EquipmentState equipment2 = component.inventory.GetEquipment((uint)component.inventory.activeEquipmentSlot);
if ((int)equipment2.equipmentIndex != -1 && ((EquipmentState)(ref equipment2)).isPerfomingRecharge)
{
FixedTimeStamp now2 = FixedTimeStamp.now;
component.inventory.DeductActiveEquipmentCooldown((equipment2.chargeFinishTime.t - now2.t) / 2f);
}
}
}
}
}
orig.Invoke(self, other);
};
<>c.<>9__14_2 = val3;
obj3 = (object)val3;
}
HealthPickup.OnTriggerStay += (hook_OnTriggerStay)obj3;
}
}
internal static class Log
{
internal static ManualLogSource _logSource;
internal static void Init(ManualLogSource logSource)
{
_logSource = logSource;
}
internal static void LogDebug(object data)
{
_logSource.LogDebug(data);
}
internal static void LogError(object data)
{
_logSource.LogError(data);
}
internal static void LogFatal(object data)
{
_logSource.LogFatal(data);
}
internal static void LogInfo(object data)
{
_logSource.LogInfo(data);
}
internal static void LogMessage(object data)
{
_logSource.LogMessage(data);
}
internal static void LogWarning(object data)
{
_logSource.LogWarning(data);
}
}
}