using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BrynzaAPI;
using EmotesAPI;
using EntityStates;
using EntityStates.Commando;
using EntityStates.Commando.CommandoWeapon;
using HG.Reflection;
using HarmonyLib;
using IL.RoR2;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using On.RoR2.Projectile;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using Rewired;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.CameraModes;
using RoR2.ContentManagement;
using RoR2.HudOverlay;
using RoR2.Navigation;
using RoR2.PostProcessing;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Bindings;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("GordonFreeman")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+40c0391ce996339b61ef37fe816408905279cc54")]
[assembly: AssemblyProduct("GordonFreeman")]
[assembly: AssemblyTitle("GordonFreeman")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
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 GordonFreeman
{
public class Assets
{
public class GordonFreemanSound
{
public string name;
public string playSoundString;
public string stopSoundString;
private NetworkSoundEventDef playSound;
private NetworkSoundEventDef stopSound;
public GordonFreemanSound(string soundName)
{
name = soundName;
playSoundString = "Play_" + soundName;
stopSoundString = "Stop_" + soundName;
playSound = ScriptableObject.CreateInstance<NetworkSoundEventDef>();
playSound.eventName = playSoundString;
ContentPacks.sounds.Add(playSound);
stopSound = ScriptableObject.CreateInstance<NetworkSoundEventDef>();
stopSound.eventName = stopSoundString;
ContentPacks.sounds.Add(stopSound);
}
}
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static CollectContentPackProvidersDelegate <>9__95_0;
internal void <Init>b__95_0(AddContentPackProviderDelegate addContentPackProvider)
{
addContentPackProvider.Invoke((IContentPackProvider)(object)new ContentPacks());
}
}
public static AssetBundle assetBundle;
public static GameObject ProfessionalBody;
public static GameObject EmotePrefab;
public static GameObject WeaponWheelSelector;
public static GameObject WeaponButtonSelector;
public static GameObject SpecialButtonSelector;
public static GameObject BanditRevolverTracer;
public static GameObject BanditRevolverMuzzleFlash;
public static GameObject BanditRevolverHit;
public static GameObject CaptainShotgunTracer;
public static GameObject CaptainShotgunMuzzleFlash;
public static GameObject CaptainShotgunHit;
public static GameObject MultRebarTracer;
public static GameObject StoneTitanLaser;
public static GameObject Explosion;
public static GameObject CoinProjectile;
public static GameObject DartProjectile;
public static GameObject SMGGrenadeProjectile;
public static GameObject RebarProjectile;
public static GameObject HomingRocketProjectile;
public static GameObject RocketProjectile;
public static GameObject HookChainEffect;
public static GameObject GluonBeamEffect;
public static GameObject UtilitySkillCharge;
public static GameObject SniperTargetTest;
public static Material IndicatorMaterial;
public static SurvivorDef ProfessionalDef;
public static SkinDef ProfessionalDefaultSkin;
public static SkinDef HeroBlackOpsSkin;
public static SkillFamily MeleePrimary;
public static SkillFamily MeleeSecondary;
public static SkillFamily HandheldsPrimary;
public static SkillFamily HandheldsSecondary;
public static SkillFamily LightWeaponsPrimary;
public static SkillFamily LightWeaponsSecondary;
public static SkillFamily HeavyWeaponsPrimary;
public static SkillFamily HeavyWeaponsSecondary;
public static SkillFamily ProfessionalUtilitySkillFamily;
public static SkillFamily ProfessionalSpecialSkillFamily;
public static SkillFamily PaintsFamily;
public static SkillDef CommandoPistolPrimary;
public static SkillDef ToolbotRebarPrimary;
public static SkillDef ArtificerPlasmaPrimary;
public static SkillDef CommandoBallSecondary;
public static SkillDef ToolbotGrenadePrimary;
public static SkillDef ArtificerBombPrimary;
public static SkillDef CommandoRollUtility;
public static SkillDef MercenaryEvisSpecial;
public static ProfessionalSkillDef RevolverPrimary;
public static ProfessionalSkillDef RevolverSecondary;
public static ProfessionalSkillDef CrossbowPrimary;
public static ProfessionalSkillDef CrossbowScope;
public static ProfessionalSkillDef CrossbowSecondary;
public static ProfessionalSkillDef ShotgunPrimary;
public static HookTarckingSkillDef ShotgunSecondary;
public static ProfessionalSkillDef SMGPrimary;
public static ProfessionalSkillDef SMGSecondary;
public static ProfessionalSkillDef PistolsPrimary;
public static ProfessionalSkillDef PistolsSecondary;
public static ProfessionalSkillDef RocketLauncherPrimary;
public static ProfessionalSkillDef RocketLauncherSecondary;
public static ProfessionalSkillDef TauCannonPrimary;
public static ProfessionalSkillDef TauCannonSecondary;
public static ProfessionalSkillDef GluonGunPrimary;
public static SkillDef QuickDash;
public static HeroSpecialSkillDef SpecialOne;
public static SkillDef Airblast;
public static SkillDef Chainsaw;
public static SkillDef GravityGun;
public static SkillDef Parry;
public static SkillDef Yellow;
public static SkillDef Black;
public static SkillDef Blue;
public static SkillDef Green;
public static SkillDef White;
public static SkillDef Red;
public static CustomMusicTrackDef HalfLifeTrack;
public static List<CustomMusicTrackDef> customMusicTracks = new List<CustomMusicTrackDef>();
public static Dictionary<string, MusicTrackDef> stringToMusic = new Dictionary<string, MusicTrackDef>();
public static GordonFreemanSound CrossbowFire = new GordonFreemanSound("hot_rebar_fire_mix");
public static GordonFreemanSound CrossbowReload = new GordonFreemanSound("hot_rebar_reload");
public static GordonFreemanSound GluonGunFire = new GordonFreemanSound("gluon_fire");
public static GordonFreemanSound GluonGunOff = new GordonFreemanSound("gluon_off");
public static GordonFreemanSound GravityGunFire = new GordonFreemanSound("gravity_gun_fire");
public static GordonFreemanSound GravityGunHold = new GordonFreemanSound("hold_loop");
public static GordonFreemanSound GravityGunPickup = new GordonFreemanSound("physcannon_pickup");
public static GordonFreemanSound PistolFire = new GordonFreemanSound("pistol_fire2");
public static GordonFreemanSound RevolverFire = new GordonFreemanSound("revolver_fire");
public static GordonFreemanSound RocketFire = new GordonFreemanSound("rocketfire1");
public static GordonFreemanSound RocketFly = new GordonFreemanSound("rocket1");
public static GordonFreemanSound ShotgunFire = new GordonFreemanSound("shotgun_fire7");
public static GordonFreemanSound SMGFire = new GordonFreemanSound("smg1_fire1");
public static GordonFreemanSound TauCannonFire = new GordonFreemanSound("gaussfire1");
public static GordonFreemanSound TauCannonCharge = new GordonFreemanSound("tauchargeloop");
public static Dictionary<string, string> actualNames = new Dictionary<string, string>();
public static void Init()
{
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Expected O, but got Unknown
//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_03ce: Unknown result type (might be due to invalid IL or missing references)
//IL_03d3: Unknown result type (might be due to invalid IL or missing references)
//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0403: Unknown result type (might be due to invalid IL or missing references)
//IL_0416: Unknown result type (might be due to invalid IL or missing references)
//IL_041b: Unknown result type (might be due to invalid IL or missing references)
//IL_042e: Unknown result type (might be due to invalid IL or missing references)
//IL_0433: Unknown result type (might be due to invalid IL or missing references)
//IL_0446: Unknown result type (might be due to invalid IL or missing references)
//IL_044b: Unknown result type (might be due to invalid IL or missing references)
//IL_045e: Unknown result type (might be due to invalid IL or missing references)
//IL_0463: Unknown result type (might be due to invalid IL or missing references)
//IL_0476: Unknown result type (might be due to invalid IL or missing references)
//IL_047b: Unknown result type (might be due to invalid IL or missing references)
//IL_048e: Unknown result type (might be due to invalid IL or missing references)
//IL_0493: Unknown result type (might be due to invalid IL or missing references)
//IL_04a6: Unknown result type (might be due to invalid IL or missing references)
//IL_04ab: Unknown result type (might be due to invalid IL or missing references)
//IL_05c4: Unknown result type (might be due to invalid IL or missing references)
//IL_05c9: Unknown result type (might be due to invalid IL or missing references)
//IL_05dc: Unknown result type (might be due to invalid IL or missing references)
//IL_05e1: Unknown result type (might be due to invalid IL or missing references)
//IL_05f4: Unknown result type (might be due to invalid IL or missing references)
//IL_05f9: Unknown result type (might be due to invalid IL or missing references)
//IL_060c: Unknown result type (might be due to invalid IL or missing references)
//IL_0611: Unknown result type (might be due to invalid IL or missing references)
//IL_0624: Unknown result type (might be due to invalid IL or missing references)
//IL_0629: Unknown result type (might be due to invalid IL or missing references)
//IL_063c: Unknown result type (might be due to invalid IL or missing references)
//IL_0641: Unknown result type (might be due to invalid IL or missing references)
//IL_0654: Unknown result type (might be due to invalid IL or missing references)
//IL_0659: Unknown result type (might be due to invalid IL or missing references)
//IL_066c: Unknown result type (might be due to invalid IL or missing references)
//IL_0671: Unknown result type (might be due to invalid IL or missing references)
//IL_0cba: Unknown result type (might be due to invalid IL or missing references)
//IL_0cbf: Unknown result type (might be due to invalid IL or missing references)
//IL_0cc5: Expected O, but got Unknown
assetBundle = AssetBundle.LoadFromFileAsync(Path.Combine(Path.GetDirectoryName(Main.PInfo.Location), "assetbundles", "gordonfreemanassets")).assetBundle;
Material[] array = assetBundle.LoadAllAssets<Material>();
foreach (Material val in array)
{
if (((Object)val.shader).name.StartsWith("StubbedRoR2"))
{
string text = ((Object)val.shader).name.Replace("StubbedRoR2", "RoR2") + ".shader";
Shader val2 = Addressables.LoadAssetAsync<Shader>((object)text).WaitForCompletion();
if (Object.op_Implicit((Object)(object)val2))
{
val.shader = val2;
}
}
}
uint num = SoundBanks.Add(Path.Combine(Path.GetDirectoryName(Main.PInfo.Location), "soundbanks", "GordonFreemanSounds.bnk"));
CustomMusicData val3 = new CustomMusicData();
val3.BanksFolderPath = Path.Combine(Path.GetDirectoryName(Main.PInfo.Location), "soundbanks");
val3.BepInPlugin = Main.PInfo.Metadata;
val3.InitBankName = "GordonFreemanInit.bnk";
val3.PlayMusicSystemEventName = "Play_Gordon_Freeman_Music_System";
val3.SoundBankName = "GordonFreemanMusic.bnk";
HalfLifeTrack = CreateCustomMusicTrack("HalfLife", "GordonFreemanMusic", 4187838533u, 3489674728u);
bool flag = Music.Add(val3);
ProfessionalBody = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Character/ProfessionalBody.prefab");
ProfessionalBodyComponent component = ProfessionalBody.GetComponent<ProfessionalBodyComponent>();
CharacterMotor component2 = ProfessionalBody.GetComponent<CharacterMotor>();
Extensions.SetKeepVelocityOnMoving(component2, true);
Extensions.SetConsistentAcceleration(component2, 10f);
Extensions.SetBunnyHop(component2, true);
Extensions.SetAirControlFromVelocityAdd(component2, 15f);
CharacterBodyAPI.AddModdedBodyFlag((CharacterBody)(object)component, Assets.SprintAllTime);
((CharacterBody)component).preferredPodPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/SurvivorPod");
((CharacterBody)component)._defaultCrosshairPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/SimpleDotCrosshair");
Extensions.SetBaseWallJumpCount((CharacterBody)(object)component, 3);
GameObject gameObject = ((Component)((Component)component).GetComponent<ModelLocator>().modelTransform).gameObject;
gameObject.GetComponent<FootstepHandler>().footstepDustPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/GenericFootstepDust");
GenericSkill[] components = ProfessionalBody.GetComponents<GenericSkill>();
GenericSkill[] array2 = components;
foreach (GenericSkill val4 in array2)
{
if (!((Object)(object)val4 == (Object)null))
{
if (val4.skillName.Contains("Secondary"))
{
SkillsAPI.SetHideInLoadout(val4, true);
SkillsAPI.SetLoadoutTitleTokenOverride(val4, "LOADOUT_SKILL_SECONDARY");
}
if (val4.skillName.Contains("Primary"))
{
SkillsAPI.SetLoadoutTitleTokenOverride(val4, "LOADOUT_SKILL_PRIMARY");
}
if (val4.skillName.Contains("1") || val4.skillName.Contains("5"))
{
Extensions.SetSection(val4, "Meelee");
}
if (val4.skillName.Contains("2") || val4.skillName.Contains("6"))
{
Extensions.SetSection(val4, "Handguns");
}
if (val4.skillName.Contains("3") || val4.skillName.Contains("7"))
{
Extensions.SetSection(val4, "Light Weapons");
}
if (val4.skillName.Contains("4") || val4.skillName.Contains("8"))
{
Extensions.SetSection(val4, "Heavy Weapons");
}
}
}
ContentPacks.bodies.Add(ProfessionalBody);
EmotePrefab = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Character/HeroEmotes.prefab");
BanditRevolverTracer = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/TracerBanditPistol.prefab").WaitForCompletion();
BanditRevolverMuzzleFlash = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/MuzzleflashBandit2.prefab").WaitForCompletion();
BanditRevolverHit = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/HitsparkBandit2Pistol.prefab").WaitForCompletion();
CaptainShotgunTracer = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Captain/TracerCaptainShotgun.prefab").WaitForCompletion();
CaptainShotgunMuzzleFlash = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/MuzzleflashBandit2.prefab").WaitForCompletion();
CaptainShotgunHit = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Captain/HitsparkCaptainShotgun.prefab").WaitForCompletion();
MultRebarTracer = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Toolbot/TracerToolbotRebar.prefab").WaitForCompletion();
StoneTitanLaser = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Titan/LaserTitan.prefab").WaitForCompletion();
Explosion = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Toolbot/OmniExplosionVFXToolbotQuick.prefab").WaitForCompletion();
IndicatorMaterial = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/VFX/matAreaIndicatorRim.mat").WaitForCompletion();
HookChainEffect = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Effects/HookChain.prefab");
GluonBeamEffect = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Effects/GluonGunBeam.prefab");
SniperTargetTest = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/HUD/FreemanSniperTarget.prefab");
CoinProjectile = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Projectiles/Coin/ProfessionalCoinProjectile.prefab").RegisterProjectile();
DartProjectile = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Projectiles/Dart/ProfessionalDartProjectile.prefab").RegisterProjectile();
SMGGrenadeProjectile = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Projectiles/SMGGrenade/ProfessionalSMGGrenadeProjectile.prefab").RegisterProjectile();
RebarProjectile = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Projectiles/Rebar/ProfessionalRebarProjectile.prefab").RegisterProjectile();
HomingRocketProjectile = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Projectiles/Rocket/ProfessionalHeatSeekingRocketProjectile.prefab").RegisterProjectile();
RocketProjectile = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/Projectiles/Rocket/ProfessionalNonHeatSeekingRocketProjectile.prefab").RegisterProjectile();
ProfessionalDef = assetBundle.LoadAsset<SurvivorDef>("Assets/Gordon Freeman/Character/ProfessionalSurvivor.asset").RegisterSurvivorDef<SurvivorDef>((Action<SurvivorDef>)null);
ProfessionalDefaultSkin = assetBundle.LoadAsset<SkinDef>("Assets/Gordon Freeman/Character/ProfessionalDefault.asset");
CommandoPistolPrimary = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Commando/CommandoBodyFirePistol.asset").WaitForCompletion();
ToolbotRebarPrimary = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Toolbot/ToolbotBodyFireSpear.asset").WaitForCompletion();
ArtificerPlasmaPrimary = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Mage/MageBodyFireLightningBolt.asset").WaitForCompletion();
CommandoBallSecondary = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Commando/CommandoBodyBarrage.asset").WaitForCompletion();
ToolbotGrenadePrimary = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Toolbot/ToolbotBodyStunDrone.asset").WaitForCompletion();
ArtificerBombPrimary = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Mage/MageBodyNovaBomb.asset").WaitForCompletion();
CommandoRollUtility = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Commando/CommandoBodyRoll.asset").WaitForCompletion();
MercenaryEvisSpecial = Addressables.LoadAssetAsync<SkillDef>((object)"RoR2/Base/Merc/MercBodyEvis.asset").WaitForCompletion();
MeleePrimary = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalMeleePrimary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
MeleeSecondary = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalMeleeSecondary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
HandheldsPrimary = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalPistolsPrimary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
HandheldsSecondary = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalPistolsSecondary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
LightWeaponsPrimary = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalLightWeaponsPrimary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
LightWeaponsSecondary = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalLightWeaponsSecondary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
HeavyWeaponsPrimary = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalHeavyWeaponsPrimary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
HeavyWeaponsSecondary = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalHeavyWeaponsSecondary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
ProfessionalUtilitySkillFamily = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalUtilityFamily.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
ProfessionalSpecialSkillFamily = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/ProfessionalSpecialFamily.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
PaintsFamily = assetBundle.LoadAsset<SkillFamily>("Assets/Gordon Freeman/SkillFamilies/Paints.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
PistolsPrimary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalPistolsPrimary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
PistolsSecondary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalPistolsSecondary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
RevolverPrimary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalRevolverPrimary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
RevolverSecondary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalRevolverSecondary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
CrossbowPrimary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalCrossbowPrimary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
CrossbowSecondary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalCrossbowSecondary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
CrossbowScope = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalCrossbowScope.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
ShotgunPrimary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalShotgunPrimary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
ShotgunSecondary = assetBundle.LoadAsset<HookTarckingSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalShotgunSecondary.asset").RegisterSkillDef<HookTarckingSkillDef>((Action<HookTarckingSkillDef>)null);
SMGPrimary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalSMGPrimary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
SMGSecondary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalSMGSecondary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
RocketLauncherPrimary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalRocketlauncherPrimary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
RocketLauncherSecondary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalRocketlauncherSecondary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
TauCannonPrimary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalTauCannonPrimary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
TauCannonSecondary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalTauCannonSecondary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
((SteppedSkillDef)TauCannonSecondary).stepGraceDuration = float.PositiveInfinity;
GluonGunPrimary = assetBundle.LoadAsset<ProfessionalSkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalGluonGunPrimary.asset").RegisterSkillDef<ProfessionalSkillDef>((Action<ProfessionalSkillDef>)null);
QuickDash = assetBundle.LoadAsset<SkillDef>("Assets/Gordon Freeman/Skills/Weapons/ProfessionalQuickDash.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
SpecialOne = assetBundle.LoadAsset<HeroSpecialSkillDef>("Assets/Gordon Freeman/Skills/Specials/ProfessionalSpecialOne.asset").RegisterSkillDef();
Airblast = assetBundle.LoadAsset<SkillDef>("Assets/Gordon Freeman/Skills/Specials/ProfessionalAirblast.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
Chainsaw = assetBundle.LoadAsset<SkillDef>("Assets/Gordon Freeman/Skills/Specials/ProfessionalChainsaw.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
GravityGun = assetBundle.LoadAsset<SkillDef>("Assets/Gordon Freeman/Skills/Specials/ProfessionalGravityGun.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
Parry = assetBundle.LoadAsset<SkillDef>("Assets/Gordon Freeman/Skills/Specials/ProfessionalParry.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
Yellow = assetBundle.LoadAsset<SkillDef>("Assets/Gordon Freeman/Skills/Colors/Yellow.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
Black = assetBundle.LoadAsset<SkillDef>("Assets/Gordon Freeman/Skills/Colors/Black.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
Blue = assetBundle.LoadAsset<SkillDef>("Assets/Gordon Freeman/Skills/Colors/Blue.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
WeaponWheelSelector = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/HUD/HeroCrosshair.prefab");
WeaponButtonSelector = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/HUD/WeaponButton.prefab");
SpecialButtonSelector = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/HUD/SpecialButton.prefab");
UtilitySkillCharge = assetBundle.LoadAsset<GameObject>("Assets/Gordon Freeman/HUD/UtiltiyCharge.prefab");
typeof(BaseFreemanState).RegisterEntityState();
typeof(ProfessionalCharacterMain).RegisterEntityState();
typeof(FreemanBulletAttack).RegisterEntityState();
typeof(FreemanFireProjectile).RegisterEntityState();
typeof(FreemanScope).RegisterEntityState();
typeof(FirePistols).RegisterEntityState();
typeof(FirePistolsBarrage).RegisterEntityState();
typeof(FireRevolver).RegisterEntityState();
typeof(FireCoin).RegisterEntityState();
typeof(FireSMG).RegisterEntityState();
typeof(FireSMGGrenade).RegisterEntityState();
typeof(FireShotgunBase).RegisterEntityState();
typeof(FireShotgunBurst).RegisterEntityState();
typeof(FireDart).RegisterEntityState();
typeof(ScopeRebar).RegisterEntityState();
typeof(FireRebar).RegisterEntityState();
typeof(FireTau).RegisterEntityState();
typeof(ChargeTau).RegisterEntityState();
typeof(FireRocket).RegisterEntityState();
typeof(SwitchRocketState).RegisterEntityState();
typeof(FreemanDash).RegisterEntityState();
typeof(FreemanSlam).RegisterEntityState();
typeof(FireGluon).RegisterEntityState();
typeof(FireParry).RegisterEntityState();
typeof(FireKnockback).RegisterEntityState();
typeof(FireChainsaw).RegisterEntityState();
typeof(FireGravityGun).RegisterEntityState();
typeof(FireHook).RegisterEntityState();
typeof(ScopeSniper).RegisterEntityState();
typeof(FireSniper).RegisterEntityState();
typeof(FireJackhammer).RegisterEntityState();
typeof(JackhammerSlingshot).RegisterEntityState();
typeof(FireCrucible).RegisterEntityState();
typeof(CrucibleSlam).RegisterEntityState();
object obj = <>c.<>9__95_0;
if (obj == null)
{
CollectContentPackProvidersDelegate val5 = delegate(AddContentPackProviderDelegate addContentPackProvider)
{
addContentPackProvider.Invoke((IContentPackProvider)(object)new ContentPacks());
};
<>c.<>9__95_0 = val5;
obj = (object)val5;
}
ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj;
}
public static void SetActualSkillName(SkillDef skillDef, string name)
{
}
public static CustomMusicTrackDef CreateCustomMusicTrack(string cachedName, string musicBankName, uint groupId, uint stateId)
{
//IL_0018: 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_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
CustomMusicTrackDef val = ScriptableObject.CreateInstance<CustomMusicTrackDef>();
((MusicTrackDef)val).cachedName = cachedName;
val.SoundBankName = musicBankName;
CustomState item = default(CustomState);
item.GroupId = groupId;
item.StateId = stateId;
CustomState item2 = default(CustomState);
item2.GroupId = 792781730u;
item2.StateId = 89505537u;
customMusicTracks.Add(val);
if (val.CustomStates == null)
{
val.CustomStates = new List<CustomState>();
}
val.CustomStates.Add(item);
val.CustomStates.Add(item2);
ContentPacks.musics.Add((MusicTrackDef)(object)val);
string key = cachedName.ToLower().Trim();
stringToMusic.Add(key, (MusicTrackDef)(object)val);
return val;
}
public static CustomMusicData CreateSoundbank(PluginInfo pluginInfo, string path, string musicBankName, string initBankName, string playEventString)
{
return CreateSoundbank(pluginInfo.Metadata, path, musicBankName, initBankName, playEventString);
}
public static CustomMusicData CreateSoundbank(BepInPlugin bepInPlugin, string path, string musicBankName, string initBankName, string playEventString)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Expected O, but got Unknown
CustomMusicData val = new CustomMusicData();
val.BanksFolderPath = path;
val.BepInPlugin = bepInPlugin;
val.InitBankName = initBankName;
val.PlayMusicSystemEventName = playEventString;
val.SoundBankName = musicBankName;
Music.Add(val);
return val;
}
}
public class ProfessionalCharacterMain : GenericCharacterMain
{
public class ButtonState
{
public float time;
public int id;
}
private bool isSprintDown;
public ProfessionalBodyComponent professionalBodyComponent;
public ProfessionalCharacterComponent professionalCharacterComponent;
public List<ButtonState> buttonStates = new List<ButtonState>();
public override void OnEnter()
{
((GenericCharacterMain)this).OnEnter();
professionalBodyComponent = ((Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody is ProfessionalBodyComponent) ? (((EntityState)this).characterBody as ProfessionalBodyComponent) : null);
professionalCharacterComponent = professionalBodyComponent?.professionalCharacterComponent;
if ((Object)(object)professionalCharacterComponent != (Object)null)
{
professionalBodyComponent.professionalCharacterMain = this;
}
buttonStates.Add(new ButtonState
{
id = 0
});
buttonStates.Add(new ButtonState
{
id = 1
});
buttonStates.Add(new ButtonState
{
id = 2
});
buttonStates.Add(new ButtonState
{
id = 3
});
}
public override void OnExit()
{
((GenericCharacterMain)this).OnExit();
buttonStates.Clear();
}
public override void Update()
{
((GenericCharacterMain)this).Update();
}
public void OperateDoubleInput(int id)
{
ButtonState buttonState = buttonStates[id];
if (buttonState == null)
{
return;
}
foreach (ButtonState buttonState2 in buttonStates)
{
if (buttonState2 != null && buttonState2 != buttonState)
{
buttonState2.time = 0f;
}
}
if (buttonState.time > 0f)
{
isSprintDown = true;
}
buttonState.time = 0.15f;
}
public override void FixedUpdate()
{
((GenericCharacterMain)this).FixedUpdate();
}
public override void HandleMovements()
{
if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.utility) && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((ButtonState)(ref ((EntityState)this).inputBank.sprint)).justPressed)
{
((EntityState)this).skillLocator.utility.ExecuteIfReady();
}
if ((Object)(object)((EntityState)this).characterBody != (Object)null)
{
((GenericCharacterMain)this).HandleMovements();
}
}
public override bool CanExecuteSkill(GenericSkill skillSlot)
{
if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && ((Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.primary) && (Object)(object)skillSlot == (Object)(object)((EntityState)this).skillLocator.primary) || (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.secondary) && (Object)(object)skillSlot == (Object)(object)((EntityState)this).skillLocator.secondary)) && Object.op_Implicit((Object)(object)professionalCharacterComponent) && Object.op_Implicit((Object)(object)professionalCharacterComponent.weaponWheelSelectorComponent) && Object.op_Implicit((Object)(object)professionalCharacterComponent.weaponWheelSelectorComponent.mainSelector) && professionalCharacterComponent.weaponWheelSelectorComponent.mainSelector.activeSelf)
{
return false;
}
if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.utility) && (Object)(object)skillSlot == (Object)(object)((EntityState)this).skillLocator.utility)
{
return false;
}
return ((GenericCharacterMain)this).CanExecuteSkill(skillSlot);
}
}
public class ProfessionalBodyComponent : CharacterBody
{
public ProfessionalCharacterComponent professionalCharacterComponent;
public ProfessionalCharacterMain professionalCharacterMain;
}
public class ProfessionalCharacterComponent : MonoBehaviour
{
public ProfessionalSkillLocator[] weapons;
public GenericSkill[] skills;
public ProfessionalSkillLocator currentWeapon;
public ProfessionalModelComponent modelComponent;
public GenericSkill currentSpecial;
public EntityStateMachine specialStateMachine;
[HideInInspector]
public ProfessionalSkillLocator previousWeapon;
[HideInInspector]
public GenericSkill previousSpecial;
public CharacterBody characterBody;
public InputBankTest inputBankTest;
public SkillLocator skillLocator;
[HideInInspector]
public OverlayController overlayController;
[HideInInspector]
public GameObject weaponWheelSelector;
[HideInInspector]
public GraphicRaycaster raycaster;
[HideInInspector]
public MPEventSystemLocator eventSystemLocator;
[HideInInspector]
public WeaponWheelSelectorComponent weaponWheelSelectorComponent;
[HideInInspector]
public HGButton selectedButton;
public GameObject weaponObject;
public FirstPersonCamera firstPersonCamera;
[HideInInspector]
public UtiltiyCharges utilityCharges;
private int _rampageCount;
public float rampageStopwatch;
private bool built = false;
public int rampageCount
{
get
{
return _rampageCount;
}
set
{
rampageStopwatch = 0f;
if (value != _rampageCount)
{
_rampageCount = value;
Main.rampage = _rampageCount > 5;
}
}
}
public void OnEnable()
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
if (!built)
{
built = true;
OverlayCreationParams val = default(OverlayCreationParams);
val.prefab = Assets.WeaponWheelSelector;
val.childLocatorEntry = "CrosshairExtras";
OverlayCreationParams val2 = val;
overlayController = HudOverlayManager.AddOverlay(((Component)this).gameObject, val2);
overlayController.onInstanceAdded += OnOverlayInstanceAdded;
overlayController.onInstanceRemove += OnOverlayInstanceRemoved;
}
void OnOverlayInstanceAdded(OverlayController controller, GameObject @object)
{
//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
//IL_01bc: Expected O, but got Unknown
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01dc: Expected O, but got Unknown
//IL_043f: Unknown result type (might be due to invalid IL or missing references)
//IL_0449: Expected O, but got Unknown
//IL_045f: Unknown result type (might be due to invalid IL or missing references)
//IL_0469: Expected O, but got Unknown
weaponWheelSelector = @object;
weaponWheelSelectorComponent = @object.GetComponent<WeaponWheelSelectorComponent>();
ChildLocator childLocator = weaponWheelSelectorComponent.childLocator;
weaponWheelSelectorComponent.professionalCharacterComponent = this;
raycaster = weaponWheelSelectorComponent.graphicRaycaster;
eventSystemLocator = weaponWheelSelectorComponent.mPEventSystemLocator;
WeaponWheelSelectorComponent obj = weaponWheelSelectorComponent;
CharacterBody obj2 = characterBody;
object networkUser;
if (obj2 == null)
{
networkUser = null;
}
else
{
CharacterMaster master = obj2.master;
if (master == null)
{
networkUser = null;
}
else
{
PlayerCharacterMasterController playerCharacterMasterController = master.playerCharacterMasterController;
networkUser = ((playerCharacterMasterController != null) ? playerCharacterMasterController.networkUser : null);
}
}
obj.networkUser = (NetworkUser)networkUser;
WeaponWheelSelectorComponent obj3 = weaponWheelSelectorComponent;
WeaponWheelSelectorComponent obj4 = weaponWheelSelectorComponent;
object player;
if (obj4 == null)
{
player = null;
}
else
{
NetworkUser networkUser2 = obj4.networkUser;
player = ((networkUser2 != null) ? networkUser2.inputPlayer : null);
}
obj3.player = (Player)player;
Transform val3 = childLocator.FindChild("WeaponSelector");
Transform val4 = childLocator.FindChild("SpecialsSelector");
Transform val5 = childLocator.FindChild("UtilityCharges");
utilityCharges = ((Component)val5).GetComponent<UtiltiyCharges>();
utilityCharges.skillLocator = skillLocator;
ProfessionalSkillLocator[] array = weapons;
foreach (ProfessionalSkillLocator professionalSkillLocator in array)
{
GameObject val6 = Object.Instantiate<GameObject>(Assets.WeaponButtonSelector, val3);
WeaponButtonSelectorComponent weaponButtonSelectorComponent = val6.GetComponent<WeaponButtonSelectorComponent>();
weaponButtonSelectorComponent.professionalSkillLocator = professionalSkillLocator;
weaponButtonSelectorComponent.weaponWheelSelectorComponent = weaponWheelSelectorComponent;
HGButton hGButton2 = weaponButtonSelectorComponent.hGButton;
((Selectable)hGButton2).image.sprite = weaponButtonSelectorComponent.professionalSkillLocator.primarySkill.baseSkill.icon;
professionalSkillLocator.button = hGButton2;
((UnityEvent)((Button)hGButton2).onClick).AddListener(new UnityAction(OnButtonClicked));
((MPButton)hGButton2).onSelect.AddListener(new UnityAction(OnButtonSelected));
ProfessionalSkillDef professionalSkillDef = ((Object.op_Implicit((Object)(object)professionalSkillLocator.primarySkill) && Object.op_Implicit((Object)(object)professionalSkillLocator.primarySkill.baseSkill) && professionalSkillLocator.primarySkill.baseSkill is ProfessionalSkillDef) ? (professionalSkillLocator.primarySkill.skillDef as ProfessionalSkillDef) : null);
if (Object.op_Implicit((Object)(object)professionalSkillDef) && Object.op_Implicit((Object)(object)professionalSkillDef.weaponModel))
{
modelComponent.AddWeaponModel((SkillDef)(object)professionalSkillDef, professionalSkillDef.weaponModel);
modelComponent.AddWeaponCrosshair(professionalSkillLocator, professionalSkillDef.weaponModel, @object.transform.parent);
}
weaponWheelSelectorComponent.weaponButtons.Add(hGButton2);
void OnButtonClicked()
{
weaponButtonSelectorComponent.SelectWeapon();
}
void OnButtonSelected()
{
selectedButton = hGButton2;
}
}
bool flag = false;
if (Object.op_Implicit((Object)(object)skillLocator))
{
GenericSkill[] allSkills = skillLocator.allSkills;
foreach (GenericSkill val7 in allSkills)
{
HeroSpecialSkillDef heroSpecialSkillDef = (((Object)(object)val7.baseSkill != (Object)null && val7.baseSkill is HeroSpecialSkillDef) ? (val7.baseSkill as HeroSpecialSkillDef) : null);
if (!((Object)(object)heroSpecialSkillDef == (Object)null))
{
List<GenericSkill> list = skillLocator.allSkills.ToList();
SkillDef[] skillsSelection = heroSpecialSkillDef.skillsSelection;
foreach (SkillDef val8 in skillsSelection)
{
GenericSkill val9 = ((Component)this).gameObject.AddComponent<GenericSkill>();
val9.defaultSkillDef = val8;
val9.baseSkill = val8;
val9.skillDef = val8;
val9.AssignSkill(val8, false);
val9.stateMachine = specialStateMachine;
val9._skillFamily = val7.skillFamily;
list.Add(val9);
GameObject val10 = Object.Instantiate<GameObject>(Assets.SpecialButtonSelector, val4);
SpeicalButtonSelectorComponent specialButtonSelectorComponent = val10.GetComponent<SpeicalButtonSelectorComponent>();
specialButtonSelectorComponent.genericSkill = val9;
specialButtonSelectorComponent.weaponWheelSelectorComponent = weaponWheelSelectorComponent;
HGButton hGButton = specialButtonSelectorComponent.hGButton;
((Selectable)hGButton).image.sprite = specialButtonSelectorComponent.genericSkill.baseSkill.icon;
((UnityEvent)((Button)hGButton).onClick).AddListener(new UnityAction(OnButtonClicked));
((MPButton)hGButton).onSelect.AddListener(new UnityAction(OnButtonSelected));
weaponWheelSelectorComponent.specialButtons.Add(hGButton);
if (skills == null)
{
skills = (GenericSkill[])(object)new GenericSkill[0];
}
CollectionExtensions.AddItem<GenericSkill>((IEnumerable<GenericSkill>)skills, val9);
if (!flag)
{
currentSpecial = val9;
flag = true;
}
void OnButtonClicked()
{
specialButtonSelectorComponent.SelectSpecial();
}
void OnButtonSelected()
{
selectedButton = hGButton;
}
}
skillLocator.allSkills = list.ToArray();
}
}
}
if (flag)
{
ApplySpecial(currentSpecial);
}
@object.SetActive(false);
}
static void OnOverlayInstanceRemoved(OverlayController controller, GameObject @object)
{
}
}
public void OnDisable()
{
Main.rampage = false;
}
public void RegisterKill(CharacterBody characterBody)
{
rampageCount++;
}
public void RegisterHit(CharacterBody characterBody, DamageInfo damageInfo)
{
rampageStopwatch = 0f;
}
public void FixedUpdate()
{
if (!Object.op_Implicit((Object)(object)inputBankTest))
{
return;
}
if (((ButtonState)(ref inputBankTest.skill3)).justPressed)
{
weaponWheelSelectorComponent.EnableMainSelector();
}
if (((ButtonState)(ref inputBankTest.skill3)).justReleased)
{
if (Object.op_Implicit((Object)(object)selectedButton))
{
((Button)selectedButton).Press();
}
weaponWheelSelectorComponent.DisableMainSelector();
}
}
public void Update()
{
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
rampageStopwatch += Time.deltaTime;
if (rampageStopwatch > 7f)
{
rampageCount = 0;
}
if (Input.mouseScrollDelta.y > 0f)
{
SwapUp();
}
if (Input.mouseScrollDelta.y < 0f)
{
SwapDown();
}
}
public void SwapUp()
{
ProfessionalSkillLocator professionalSkillLocator = weapons[0];
Array.Copy(weapons, 1, weapons, 0, weapons.Length - 1);
ProfessionalSkillLocator professionalSkillLocator2 = currentWeapon;
weapons[weapons.Length - 1] = professionalSkillLocator2;
ApplyWeapon(professionalSkillLocator);
}
public void SwapDown()
{
Array.Reverse(weapons);
ProfessionalSkillLocator professionalSkillLocator = weapons[0];
Array.Copy(weapons, 1, weapons, 0, weapons.Length - 1);
ProfessionalSkillLocator professionalSkillLocator2 = currentWeapon;
weapons[weapons.Length - 1] = professionalSkillLocator2;
Array.Reverse(weapons);
ApplyWeapon(professionalSkillLocator);
}
public void ApplyWeapon(ProfessionalSkillLocator professionalSkillLocator)
{
if ((Object)(object)professionalSkillLocator == (Object)null)
{
return;
}
previousWeapon = currentWeapon;
currentWeapon = professionalSkillLocator;
skillLocator.primary.stateMachine.SetNextStateToMain();
skillLocator.secondary.stateMachine.SetNextStateToMain();
skillLocator.primary = professionalSkillLocator.primarySkill;
skillLocator.secondary = professionalSkillLocator.secondarySkill;
Extensions.LinkSkill(skillLocator.primary, (GenericSkill)null);
Extensions.LinkSkill(skillLocator.secondary, (GenericSkill)null);
skillLocator.primary.RecalculateValues();
skillLocator.secondary.RecalculateValues();
ProfessionalSkillLocator[] array = weapons;
foreach (ProfessionalSkillLocator professionalSkillLocator2 in array)
{
if ((Object)(object)professionalSkillLocator2.primarySkill != (Object)(object)skillLocator.primary)
{
Extensions.LinkSkill(professionalSkillLocator2.primarySkill, skillLocator.primary);
professionalSkillLocator2.primarySkill.RecalculateValues();
}
if ((Object)(object)professionalSkillLocator2.secondarySkill != (Object)(object)skillLocator.secondary)
{
Extensions.LinkSkill(professionalSkillLocator2.secondarySkill, skillLocator.secondary);
professionalSkillLocator2.secondarySkill.RecalculateValues();
}
}
modelComponent.PullOnWeaponModel(professionalSkillLocator.primarySkill.baseSkill);
}
public void ApplySpecial(GenericSkill genericSkill)
{
if ((Object)(object)genericSkill == (Object)null)
{
return;
}
previousSpecial = currentSpecial;
currentSpecial = genericSkill;
skillLocator.special.stateMachine.SetNextStateToMain();
skillLocator.special = genericSkill;
Extensions.LinkSkill(skillLocator.special, (GenericSkill)null);
skillLocator.special.RecalculateValues();
GenericSkill[] array = skills;
foreach (GenericSkill val in array)
{
if (!((Object)(object)val == (Object)null))
{
Extensions.LinkSkill(val, genericSkill);
val.RecalculateValues();
}
}
}
}
public class ProfessionalModelComponent : MonoBehaviour
{
[HideInInspector]
public Dictionary<SkillDef, WeaponModel> skillsToWeaponModels = new Dictionary<SkillDef, WeaponModel>();
[HideInInspector]
public Dictionary<ProfessionalSkillLocator, WeaponCrosshairBaseAddition> skillsToWeaponCrosshairs = new Dictionary<ProfessionalSkillLocator, WeaponCrosshairBaseAddition>();
public Transform weaponsTransform;
public Transform weaponTransform;
[HideInInspector]
public WeaponModel currentWeaponModel;
[HideInInspector]
public WeaponCrosshairBaseAddition currentWeaponCrosshair;
public FirstPersonCamera firstPersonCamera;
public CameraTargetParams cameraTargetParams;
public ChildLocator childLocator;
[HideInInspector]
public Vector3 weaponVector;
[HideInInspector]
public Vector3 weaponVectorVelocity;
public static float weaponVectorSmoothTime = 0.2f;
public WeaponModel AddWeaponModel(SkillDef skillDef, WeaponModelDef weaponModelDef)
{
if ((Object)(object)skillDef == (Object)null || (Object)(object)weaponModelDef == (Object)null || skillsToWeaponModels.ContainsKey(skillDef))
{
return null;
}
WeaponModel weaponModel = weaponModelDef.ApplyWeaponModel(this);
skillsToWeaponModels.Add(skillDef, weaponModel);
return weaponModel;
}
public WeaponCrosshairBaseAddition AddWeaponCrosshair(ProfessionalSkillLocator professionalSkillLocator, WeaponModelDef weaponModelDef, Transform transform)
{
if ((Object)(object)weaponModelDef == (Object)null || (Object)(object)weaponModelDef.crosshairAddition == (Object)null)
{
return null;
}
WeaponCrosshairBaseAddition weaponCrosshairBaseAddition = Object.Instantiate<WeaponCrosshairBaseAddition>(weaponModelDef.crosshairAddition, transform);
((Component)weaponCrosshairBaseAddition).gameObject.SetActive(false);
weaponCrosshairBaseAddition.primarySkill = professionalSkillLocator.primarySkill;
weaponCrosshairBaseAddition.secondarySkill = professionalSkillLocator.secondarySkill;
skillsToWeaponCrosshairs.Add(professionalSkillLocator, weaponCrosshairBaseAddition);
return weaponCrosshairBaseAddition;
}
public WeaponModel PullOnWeaponModel(SkillDef skillDef)
{
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)skillDef == (Object)null)
{
return null;
}
if (!skillsToWeaponModels.ContainsKey(skillDef))
{
PullOffCurrentWeaponModel();
return null;
}
WeaponModel weaponModel = skillsToWeaponModels[skillDef];
if (Object.op_Implicit((Object)(object)currentWeaponModel))
{
PullOffCurrentWeaponModel();
}
((Component)weaponModel).gameObject.SetActive(true);
currentWeaponModel = weaponModel;
((Component)weaponModel).transform.rotation = Quaternion.identity;
((Component)weaponModel).transform.SetParent(weaponTransform, false);
if (Object.op_Implicit((Object)(object)cameraTargetParams))
{
cameraTargetParams.recoil = Vector2.zero;
cameraTargetParams.recoilVelocity = Vector2.zero;
}
weaponVector = new Vector3(45f, 0f, 0f);
int num = childLocator.FindChildIndex("Muzzle");
if (num != -1)
{
childLocator.transformPairs[num].transform = (Object.op_Implicit((Object)(object)weaponModel.muzzleTransform) ? weaponModel.muzzleTransform : weaponTransform);
}
return weaponModel;
}
public WeaponCrosshairBaseAddition TurnOnWeaponCrosshair(ProfessionalSkillLocator professionalSkillLocator)
{
if ((Object)(object)professionalSkillLocator == (Object)null)
{
return null;
}
if (!skillsToWeaponCrosshairs.ContainsKey(professionalSkillLocator))
{
return null;
}
WeaponCrosshairBaseAddition weaponCrosshairBaseAddition = (currentWeaponCrosshair = skillsToWeaponCrosshairs[professionalSkillLocator]);
((Component)weaponCrosshairBaseAddition).gameObject.SetActive(true);
return weaponCrosshairBaseAddition;
}
public void TurnOffCurrentWeaponCrosshair()
{
WeaponCrosshairBaseAddition weaponCrosshairBaseAddition = currentWeaponCrosshair;
if (!((Object)(object)weaponCrosshairBaseAddition == (Object)null))
{
((Component)weaponCrosshairBaseAddition).gameObject.SetActive(false);
currentWeaponCrosshair = null;
}
}
public void PullOffCurrentWeaponModel()
{
//IL_0048: Unknown result type (might be due to invalid IL or missing references)
if (!((Object)(object)currentWeaponModel == (Object)null))
{
((Component)currentWeaponModel).transform.SetParent(weaponsTransform, false);
((Component)currentWeaponModel).gameObject.SetActive(false);
((Component)currentWeaponModel).transform.rotation = Quaternion.identity;
currentWeaponModel = null;
int num = childLocator.FindChildIndex("Muzzle");
if (num != -1)
{
childLocator.transformPairs[num].transform = weaponTransform;
}
}
}
public void Update()
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//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_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
//IL_013b: Unknown result type (might be due to invalid IL or missing references)
if (weaponVector != Vector3.zero)
{
weaponVector = Vector3.SmoothDamp(weaponVector, Vector3.zero, ref weaponVectorVelocity, weaponVectorSmoothTime);
}
if (Object.op_Implicit((Object)(object)currentWeaponModel) && Object.op_Implicit((Object)(object)cameraTargetParams))
{
bool flag = cameraTargetParams.recoil == Vector2.zero;
if (!flag)
{
weaponVector = Vector3.zero;
}
((Component)currentWeaponModel).transform.localEulerAngles = new Vector3((flag ? 0f : (cameraTargetParams.recoil.y * 2f)) + weaponVector.x, (flag ? 0f : (cameraTargetParams.recoil.x * 2f)) + weaponVector.y, 0f + weaponVector.z);
((Component)currentWeaponModel).transform.localPosition = new Vector3(0f, 0f, flag ? 0f : ((0f - ((Vector2)(ref cameraTargetParams.recoil)).magnitude) / 2f));
}
}
}
public class ProfessionalSkillLocator : MonoBehaviour
{
public GenericSkill primarySkill;
public GenericSkill secondarySkill;
[HideInInspector]
public HGButton button;
public void Start()
{
if (!((Object)(object)primarySkill == (Object)null) && !((Object)(object)secondarySkill == (Object)null))
{
SkillDef val = ((Object.op_Implicit((Object)(object)primarySkill.baseSkill) && primarySkill.baseSkill is ProfessionalSkillDef) ? (primarySkill.baseSkill as ProfessionalSkillDef).secondarySkillDef : null);
if (!((Object)(object)val == (Object)null))
{
secondarySkill.SetBaseSkill(val);
secondarySkill.AssignSkill(val, false);
}
}
}
}
public class RadialLayout : LayoutGroup
{
public float fDistance;
[Range(0f, 360f)]
public float MinAngle;
[Range(0f, 360f)]
public float MaxAngle;
[Range(0f, 360f)]
public float StartAngle;
public bool OnlyLayoutVisible = false;
public override void OnEnable()
{
((LayoutGroup)this).OnEnable();
CalculateRadial();
}
public override void SetLayoutHorizontal()
{
}
public override void SetLayoutVertical()
{
}
public override void CalculateLayoutInputVertical()
{
CalculateRadial();
}
public override void CalculateLayoutInputHorizontal()
{
CalculateRadial();
}
public override void OnDisable()
{
((DrivenRectTransformTracker)(ref base.m_Tracker)).Clear();
LayoutRebuilder.MarkLayoutForRebuild(((LayoutGroup)this).rectTransform);
}
private void CalculateRadial()
{
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Expected O, but got Unknown
//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
//IL_00d2: Expected O, but got Unknown
//IL_013a: Unknown result type (might be due to invalid IL or missing references)
//IL_0142: Unknown result type (might be due to invalid IL or missing references)
//IL_0164: Unknown result type (might be due to invalid IL or missing references)
//IL_016c: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Unknown result type (might be due to invalid IL or missing references)
//IL_016f: Unknown result type (might be due to invalid IL or missing references)
//IL_0177: Unknown result type (might be due to invalid IL or missing references)
((DrivenRectTransformTracker)(ref base.m_Tracker)).Clear();
if (((Component)this).transform.childCount == 0)
{
return;
}
int num = 0;
if (OnlyLayoutVisible)
{
for (int i = 0; i < ((Component)this).transform.childCount; i++)
{
RectTransform val = (RectTransform)((Component)this).transform.GetChild(i);
if ((Object)(object)val != (Object)null && ((Component)val).gameObject.activeSelf)
{
num++;
}
}
}
else
{
num = ((Component)this).transform.childCount;
}
float num2 = (MaxAngle - MinAngle) / (float)num;
float num3 = StartAngle;
Vector3 val3 = default(Vector3);
Vector2 val4 = default(Vector2);
for (int j = 0; j < ((Component)this).transform.childCount; j++)
{
RectTransform val2 = (RectTransform)((Component)this).transform.GetChild(j);
if ((Object)(object)val2 != (Object)null && (!OnlyLayoutVisible || ((Component)val2).gameObject.activeSelf))
{
((DrivenRectTransformTracker)(ref base.m_Tracker)).Add((Object)(object)this, val2, (DrivenTransformProperties)52998);
((Vector3)(ref val3))..ctor(Mathf.Cos(num3 * (MathF.PI / 180f)), Mathf.Sin(num3 * (MathF.PI / 180f)), 0f);
((Transform)val2).localPosition = val3 * fDistance;
((Vector2)(ref val4))..ctor(0.5f, 0.5f);
val2.pivot = val4;
Vector2 anchorMin = (val2.anchorMax = val4);
val2.anchorMin = anchorMin;
num3 += num2;
}
}
}
}
public class WeaponWheelSelectorComponent : MonoBehaviour
{
[HideInInspector]
public ProfessionalCharacterComponent professionalCharacterComponent;
public GameObject weaponSelector;
public GameObject specialsSelector;
public GameObject selectedSelector;
public GameObject mainSelector;
[HideInInspector]
public List<HGButton> weaponButtons = new List<HGButton>();
[HideInInspector]
public List<HGButton> specialButtons = new List<HGButton>();
[HideInInspector]
public Player player;
[HideInInspector]
public NetworkUser networkUser;
public ChildLocator childLocator;
public GraphicRaycaster graphicRaycaster;
public MPEventSystemLocator mPEventSystemLocator;
public LineRenderer lineRenderer;
public Canvas canvas;
[HideInInspector]
public Vector2 previousMousePosition = Vector2.zero;
[HideInInspector]
public Vector2 arrowDirection = new Vector2(0f, 1f);
public static float cursorLength = 64f;
public bool isSpecialSelectorSelected => (Object)(object)selectedSelector == (Object)(object)specialsSelector;
public void ScrollUp()
{
selectedSelector.SetActive(false);
selectedSelector = (isSpecialSelectorSelected ? weaponSelector : specialsSelector);
selectedSelector.SetActive(true);
}
public void ScrollDown()
{
selectedSelector.SetActive(false);
selectedSelector = (isSpecialSelectorSelected ? weaponSelector : specialsSelector);
selectedSelector.SetActive(true);
}
public void SelectWeaponSelector()
{
selectedSelector.SetActive(false);
selectedSelector = weaponSelector;
selectedSelector.SetActive(true);
}
public void SelectSpecialsSelector()
{
selectedSelector.SetActive(false);
selectedSelector = specialsSelector;
selectedSelector.SetActive(true);
}
public void Update()
{
//IL_0096: Unknown result type (might be due to invalid IL or missing references)
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: 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_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_00f4: Unknown result type (might be due to invalid IL or missing references)
//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0129: Unknown result type (might be due to invalid IL or missing references)
//IL_0141: Unknown result type (might be due to invalid IL or missing references)
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
//IL_015b: Unknown result type (might be due to invalid IL or missing references)
//IL_0161: Unknown result type (might be due to invalid IL or missing references)
//IL_016b: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: Unknown result type (might be due to invalid IL or missing references)
//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
if (player != null)
{
if (player.GetButtonDown(7))
{
ScrollUp();
}
if (player.GetButtonDown(8))
{
ScrollDown();
}
}
if ((Object)(object)professionalCharacterComponent == (Object)null || !mainSelector.activeSelf)
{
return;
}
MPEventSystemLocator obj = mPEventSystemLocator;
object obj2;
if (obj == null)
{
obj2 = null;
}
else
{
MPEventSystem eventSystem = obj.eventSystem;
obj2 = ((eventSystem != null) ? ((EventSystem)eventSystem).currentInputModule : null);
}
MPInputModule val = (MPInputModule)obj2;
MPInput val2 = (MPInput)(((int)val != 0) ? ((BaseInputModule)val).input : null);
if ((Object)(object)val2 == (Object)null)
{
return;
}
Vector2 val3 = default(Vector2);
((Vector2)(ref val3))..ctor((float)Screen.width / 2f, (float)Screen.height / 2f);
Vector2 val4 = val2.internalMousePosition - val3;
val2.CenterCursor();
previousMousePosition = val2.internalMousePosition;
if (val4 != Vector2.down)
{
arrowDirection = ((Vector2)(ref val4)).normalized;
}
lineRenderer.SetPosition(0, ((Component)this).transform.position);
lineRenderer.SetPosition(1, Vector2.op_Implicit(new Vector2(((Component)this).transform.position.x, ((Component)this).transform.position.y) + arrowDirection * cursorLength));
float num = 3720f;
HGButton val5 = null;
int num2 = 0;
if (specialButtons != null && weaponButtons != null)
{
foreach (HGButton item in ((Object)(object)selectedSelector == (Object)(object)weaponSelector) ? weaponButtons : specialButtons)
{
if (!((Object)(object)item == (Object)null))
{
float num3 = Vector3.Angle(Vector2.op_Implicit(val4), ((Component)item).transform.localPosition);
if (num3 < num)
{
num = num3;
val5 = item;
}
num2++;
}
}
}
if (!((Object)(object)val5 == (Object)null))
{
((Selectable)val5).Select();
}
}
public void DisableMainSelector()
{
SelectWeaponSelector();
mainSelector.SetActive(false);
}
public void EnableMainSelector()
{
SelectWeaponSelector();
mainSelector.SetActive(true);
}
}
public class WeaponButtonSelectorComponent : MonoBehaviour
{
public ProfessionalSkillLocator professionalSkillLocator;
public WeaponWheelSelectorComponent weaponWheelSelectorComponent;
public HGButton hGButton;
public HGTextMeshProUGUI primaryText;
public HGTextMeshProUGUI secondaryText;
public void FixedUpdate()
{
if ((Object)(object)professionalSkillLocator == (Object)null)
{
return;
}
GenericSkill primarySkill = professionalSkillLocator.primarySkill;
GenericSkill secondarySkill = professionalSkillLocator.secondarySkill;
if (!((Object)(object)primarySkill == (Object)null) || !((Object)(object)secondarySkill == (Object)null))
{
if (Object.op_Implicit((Object)(object)primarySkill) && Object.op_Implicit((Object)(object)primaryText))
{
((TMP_Text)primaryText).text = "1S ST: " + primarySkill.stock + "\n1S CD:" + primarySkill.cooldownRemaining;
}
if (Object.op_Implicit((Object)(object)secondarySkill) && Object.op_Implicit((Object)(object)secondaryText))
{
((TMP_Text)secondaryText).text = "2S ST: " + secondarySkill.stock + "\n2S CD:" + secondarySkill.cooldownRemaining;
}
}
}
public void SelectWeapon()
{
if (!((Object)(object)weaponWheelSelectorComponent == (Object)null) && !((Object)(object)weaponWheelSelectorComponent.professionalCharacterComponent == (Object)null))
{
weaponWheelSelectorComponent.professionalCharacterComponent.ApplyWeapon(professionalSkillLocator);
weaponWheelSelectorComponent.DisableMainSelector();
}
}
}
public class SpeicalButtonSelectorComponent : MonoBehaviour
{
public GenericSkill genericSkill;
public WeaponWheelSelectorComponent weaponWheelSelectorComponent;
public HGButton hGButton;
public HeroSpecialSkillDef weaponSpecialSkillDef;
public void SelectSpecial()
{
if (!((Object)(object)weaponWheelSelectorComponent == (Object)null) && !((Object)(object)weaponWheelSelectorComponent.professionalCharacterComponent == (Object)null))
{
weaponWheelSelectorComponent.professionalCharacterComponent.ApplySpecial(genericSkill);
weaponWheelSelectorComponent.DisableMainSelector();
}
}
}
public class FreemanProjectileController : ProjectileController
{
public float contradictGravityValue;
public void Start()
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_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)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
((ProjectileController)this).Start();
if (base.rigidbody.useGravity)
{
Rigidbody rigidbody = base.rigidbody;
rigidbody.velocity += Physics.gravity * contradictGravityValue * -1f;
}
}
}
public class CointHitComponent : MonoBehaviour
{
public static List<CointHitComponent> cointHitComponents = new List<CointHitComponent>();
public TeamFilter teamFilter;
public bool hit = false;
public FreemanProjectileController freemanProjectileController;
public GameObject owner => ((ProjectileController)(freemanProjectileController?)).owner;
public void OnEnable()
{
cointHitComponents.Add(this);
}
public void OnDisable()
{
if (cointHitComponents.Contains(this))
{
cointHitComponents.Remove(this);
}
}
public void FixedUpdate()
{
//IL_0020: 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_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_0059: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)owner))
{
Vector3 val = owner.transform.position - ((Component)this).transform.position;
float magnitude = ((Vector3)(ref val)).magnitude;
float num = MathF.Max(magnitude / 5f, 1f);
((Component)this).transform.localScale = new Vector3(num, num, num);
}
}
public void Hit(BulletAttack bulletAttack)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: 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_00d9: Expected O, but got Unknown
//IL_00db: Unknown result type (might be due to invalid IL or missing references)
//IL_00e0: 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_010d: Unknown result type (might be due to invalid IL or missing references)
//IL_0112: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_0124: Unknown result type (might be due to invalid IL or missing references)
//IL_012c: Unknown result type (might be due to invalid IL or missing references)
//IL_0183: Unknown result type (might be due to invalid IL or missing references)
//IL_018e: Unknown result type (might be due to invalid IL or missing references)
//IL_0193: Unknown result type (might be due to invalid IL or missing references)
//IL_0198: Unknown result type (might be due to invalid IL or missing references)
//IL_019a: Unknown result type (might be due to invalid IL or missing references)
//IL_019b: Unknown result type (might be due to invalid IL or missing references)
//IL_01be: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
//IL_0203: Unknown result type (might be due to invalid IL or missing references)
//IL_0205: Unknown result type (might be due to invalid IL or missing references)
//IL_020a: Unknown result type (might be due to invalid IL or missing references)
//IL_020f: Unknown result type (might be due to invalid IL or missing references)
//IL_021b: Unknown result type (might be due to invalid IL or missing references)
//IL_0227: Unknown result type (might be due to invalid IL or missing references)
//IL_0233: Unknown result type (might be due to invalid IL or missing references)
//IL_023f: Unknown result type (might be due to invalid IL or missing references)
//IL_0241: Unknown result type (might be due to invalid IL or missing references)
//IL_0246: Unknown result type (might be due to invalid IL or missing references)
//IL_024b: Unknown result type (might be due to invalid IL or missing references)
//IL_0257: Unknown result type (might be due to invalid IL or missing references)
//IL_0263: Unknown result type (might be due to invalid IL or missing references)
//IL_026e: Unknown result type (might be due to invalid IL or missing references)
//IL_0279: Unknown result type (might be due to invalid IL or missing references)
//IL_0285: Unknown result type (might be due to invalid IL or missing references)
//IL_0291: Unknown result type (might be due to invalid IL or missing references)
//IL_0298: Unknown result type (might be due to invalid IL or missing references)
//IL_029d: Unknown result type (might be due to invalid IL or missing references)
//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
//IL_02ae: Unknown result type (might be due to invalid IL or missing references)
//IL_02ba: Unknown result type (might be due to invalid IL or missing references)
//IL_02c6: Unknown result type (might be due to invalid IL or missing references)
//IL_02d2: 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_02ea: Unknown result type (might be due to invalid IL or missing references)
//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0302: Unknown result type (might be due to invalid IL or missing references)
//IL_0304: Unknown result type (might be due to invalid IL or missing references)
//IL_0309: Unknown result type (might be due to invalid IL or missing references)
//IL_030e: Unknown result type (might be due to invalid IL or missing references)
//IL_031a: Unknown result type (might be due to invalid IL or missing references)
//IL_0327: Expected O, but got Unknown
//IL_007d: 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_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
hit = true;
if (cointHitComponents.Contains(this))
{
cointHitComponents.Remove(this);
}
Vector3 val = Vector3.zero;
float num = 99980000f;
if (cointHitComponents.Count > 0)
{
for (int i = 0; i < cointHitComponents.Count; i++)
{
CointHitComponent cointHitComponent = cointHitComponents[i];
if (!((Object)(object)cointHitComponent == (Object)null) && !cointHitComponent.hit)
{
Vector3 val2 = ((Component)cointHitComponent).transform.position - ((Component)this).transform.position;
float sqrMagnitude = ((Vector3)(ref val2)).sqrMagnitude;
if (!(num < sqrMagnitude))
{
num = sqrMagnitude;
val = val2;
}
}
}
}
else
{
BullseyeSearch val3 = new BullseyeSearch();
val3.teamMaskFilter = TeamMask.all;
((TeamMask)(ref val3.teamMaskFilter)).RemoveTeam(teamFilter.teamIndex);
val3.filterByLoS = true;
val3.searchOrigin = ((Component)this).transform.position;
val3.searchDirection = ((Component)this).transform.eulerAngles;
val3.sortMode = (SortMode)1;
val3.maxDistanceFilter = 9999f;
val3.maxAngleFilter = 361f;
val3.RefreshCandidates();
val3.FilterOutGameObject(((Component)this).gameObject);
HurtBox val4 = val3.GetResults().FirstOrDefault();
if ((Object)(object)val4 != (Object)null)
{
val = ((Component)val4).transform.position - ((Component)this).transform.position;
}
}
if (val == Vector3.zero)
{
Object.Destroy((Object)(object)((Component)this).gameObject);
return;
}
BulletAttack val5 = new BulletAttack
{
aimVector = val,
allowTrajectoryAimAssist = false,
bulletCount = 1u,
damage = bulletAttack.damage * 2f,
damageColorIndex = bulletAttack.damageColorIndex,
damageType = bulletAttack.damageType,
falloffModel = bulletAttack.falloffModel,
filterCallback = bulletAttack.filterCallback,
force = bulletAttack.force,
hitCallback = bulletAttack.hitCallback,
hitEffectPrefab = bulletAttack.hitEffectPrefab,
hitMask = bulletAttack.hitMask,
isCrit = bulletAttack.isCrit,
maxDistance = 9999f,
maxSpread = 0f,
minSpread = 0f,
modifyOutgoingDamageCallback = bulletAttack.modifyOutgoingDamageCallback,
owner = bulletAttack.owner,
origin = ((Component)this).transform.position,
procChainMask = bulletAttack.procChainMask,
procCoefficient = bulletAttack.procCoefficient,
radius = bulletAttack.radius,
sniper = bulletAttack.sniper,
weapon = ((Component)this).gameObject,
smartCollision = bulletAttack.smartCollision,
stopperMask = bulletAttack.stopperMask,
tracerEffectPrefab = bulletAttack.tracerEffectPrefab,
queryTriggerInteraction = bulletAttack.queryTriggerInteraction,
spreadPitchScale = bulletAttack.spreadPitchScale,
spreadYawScale = bulletAttack.spreadYawScale
};
val5.Fire();
Object.Destroy((Object)(object)((Component)this).gameObject);
}
}
public class FirstPersonCamera : MonoBehaviour
{
[CompilerGenerated]
private sealed class <Details>d__23 : IEnumerator<object>, IEnumerator, IDisposable
{
private int <>1__state;
private object <>2__current;
public float value;
public FirstPersonCamera <>4__this;
private List<Material>.Enumerator <>s__1;
private Material <material>5__2;
private List<Material>.Enumerator <>s__3;
private Material <material>5__4;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Details>d__23(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>s__1 = default(List<Material>.Enumerator);
<material>5__2 = null;
<>s__3 = default(List<Material>.Enumerator);
<material>5__4 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0093: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: Unknown result type (might be due to invalid IL or missing references)
//IL_0122: Unknown result type (might be due to invalid IL or missing references)
//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
//IL_01af: Unknown result type (might be due to invalid IL or missing references)
//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
//IL_01db: Unknown result type (might be due to invalid IL or missing references)
//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
//IL_0207: Unknown result type (might be due to invalid IL or missing references)
//IL_0228: Unknown result type (might be due to invalid IL or missing references)
//IL_0233: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
return false;
case 1:
<>1__state = -1;
<>s__1 = Main.TriPlanarMaterials.GetEnumerator();
try
{
while (<>s__1.MoveNext())
{
<material>5__2 = <>s__1.Current;
<material>5__2.SetTextureScale("_RedChannelTopTex", <material>5__2.GetTextureScale("_RedChannelTopTex") * value);
<material>5__2.SetTextureScale("_RedChannelSideTex", <material>5__2.GetTextureScale("_RedChannelSideTex") * value);
<material>5__2.SetTextureScale("_GreenChannelTex", <material>5__2.GetTextureScale("_GreenChannelTex") * value);
<material>5__2.SetTextureScale("_BlueChannelTex", <material>5__2.GetTextureScale("_BlueChannelTex") * value);
<material>5__2.SetTextureScale("_NormalTex", <material>5__2.GetTextureScale("_NormalTex") * value);
<material>5__2 = null;
}
}
finally
{
((IDisposable)<>s__1).Dispose();
}
<>s__1 = default(List<Material>.Enumerator);
<>s__3 = Main.SnowToppedMaterials.GetEnumerator();
try
{
while (<>s__3.MoveNext())
{
<material>5__4 = <>s__3.Current;
<material>5__4.SetTextureScale("_SnowTex", <material>5__4.GetTextureScale("_SnowTex") * value);
<material>5__4.SetTextureScale("_SnowNormalTex", <material>5__4.GetTextureScale("_SnowNormalTex") * value);
<material>5__4.SetTextureScale("_DirtTex", <material>5__4.GetTextureScale("_DirtTex") * value);
<material>5__4.SetTextureScale("_DirtNormalTex", <material>5__4.GetTextureScale("_DirtNormalTex") * value);
<material>5__4 = null;
}
}
finally
{
((IDisposable)<>s__3).Dispose();
}
<>s__3 = default(List<Material>.Enumerator);
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
public static float fov = 100f;
public CharacterBody characterBody;
public ProfessionalModelComponent professionalModelComponent;
[HideInInspector]
public PlayerCharacterMasterController playerCharacterMasterController;
[HideInInspector]
public CameraRigController cameraRigController;
[HideInInspector]
public Camera previousCameraObject;
[HideInInspector]
public Camera currentCameraObject;
[HideInInspector]
public CharacterModel characterModel;
[HideInInspector]
public HurtBoxGroup hurtBoxGroup;
[HideInInspector]
public float previousFov;
[HideInInspector]
public SceneCamera sceneCamera;
[HideInInspector]
public Camera weaponCamera;
[HideInInspector]
public InputBankTest inputBankTest;
[HideInInspector]
public Transform weaponCameraTransform;
[HideInInspector]
public Transform previousWeaponParentTransform;
[HideInInspector]
public Vector3 previousWeaponPosition;
[HideInInspector]
public static Vector3 cameraWeaponPosition = Vector3.zero;
private bool enabled = false;
public static float textureScale = 2f;
private bool waitToIncreaseDetails = true;
public void FixedUpdate()
{
//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0302: Unknown result type (might be due to invalid IL or missing references)
//IL_031e: Unknown result type (might be due to invalid IL or missing references)
//IL_0382: Unknown result type (might be due to invalid IL or missing references)
//IL_0393: Unknown result type (might be due to invalid IL or missing references)
if (enabled)
{
return;
}
enabled = true;
if ((Object)(object)characterBody == (Object)null || !characterBody.isPlayerControlled || !Util.HasEffectiveAuthority(characterBody.networkIdentity))
{
return;
}
if (Object.op_Implicit((Object)(object)characterBody.modelLocator) && Object.op_Implicit((Object)(object)characterBody.modelLocator.modelTransform))
{
characterModel = ((Component)characterBody.modelLocator.modelTransform).gameObject.GetComponent<CharacterModel>();
if ((Object)(object)characterModel != (Object)null)
{
CharacterModel obj = characterModel;
int invisibilityCount = obj.invisibilityCount;
obj.invisibilityCount = invisibilityCount + 1;
}
}
if (Object.op_Implicit((Object)(object)characterBody.inputBank))
{
inputBankTest = characterBody.inputBank;
}
if ((Object)(object)characterBody.master == (Object)null)
{
return;
}
playerCharacterMasterController = characterBody.master.playerCharacterMasterController;
if ((Object)(object)playerCharacterMasterController == (Object)null)
{
return;
}
cameraRigController = playerCharacterMasterController.networkUser?.cameraRigController;
if ((Object)(object)cameraRigController == (Object)null)
{
return;
}
previousCameraObject = cameraRigController.sceneCam;
if (!((Object)(object)previousCameraObject == (Object)null))
{
currentCameraObject = Object.Instantiate<Camera>(previousCameraObject, ((Component)this).transform);
ScreenDamage component = ((Component)currentCameraObject).GetComponent<ScreenDamage>();
ScreenDamage component2 = ((Component)previousCameraObject).GetComponent<ScreenDamage>();
component.cameraRigController = cameraRigController;
component.screenDamageCalculatorDefault = component2.screenDamageCalculatorDefault;
component.workingScreenDamageCalculator = component2.workingScreenDamageCalculator;
previousFov = cameraRigController.baseFov;
cameraRigController.baseFov = fov;
currentCameraObject.nearClipPlane = 0.01f;
((Component)previousCameraObject).gameObject.SetActive(false);
cameraRigController.sceneCam = currentCameraObject;
ProfessionalBodyComponent professionalBodyComponent = ((characterBody is ProfessionalBodyComponent) ? (characterBody as ProfessionalBodyComponent) : null);
sceneCamera = ((Component)currentCameraObject).GetComponent<SceneCamera>();
if ((Object)(object)sceneCamera != (Object)null)
{
sceneCamera.cameraRigController = cameraRigController;
}
weaponCamera = Object.Instantiate<Camera>(currentCameraObject, ((Component)currentCameraObject).transform, false);
weaponCameraTransform = ((Component)weaponCamera).transform;
Transform weaponTransform = professionalModelComponent.weaponTransform;
previousWeaponParentTransform = weaponTransform.parent;
weaponTransform.SetParent(weaponCameraTransform, false);
previousWeaponPosition = weaponCameraTransform.localPosition;
weaponCamera.cullingMask = 65536;
weaponCameraTransform.localPosition = Vector3.zero;
((Behaviour)weaponCamera).enabled = true;
weaponCamera.depth = 1f;
weaponCamera.clearFlags = (CameraClearFlags)3;
weaponCamera.fieldOfView = fov;
weaponCameraTransform.SetParent(((Component)currentCameraObject).transform);
weaponCameraTransform.localPosition = cameraWeaponPosition;
weaponCameraTransform.localEulerAngles = Vector3.zero;
SceneCamera component3 = ((Component)weaponCamera).GetComponent<SceneCamera>();
if ((Object)(object)component3 != (Object)null)
{
component3.cameraRigController = cameraRigController;
}
PostProcessLayer component4 = ((Component)weaponCamera).GetComponent<PostProcessLayer>();
Object.Destroy((Object)(object)component4);
}
}
public void OnEnable()
{
}
private void IncreaseDetails()
{
waitToIncreaseDetails = false;
IEnumerator enumerator = Details(textureScale);
while (enumerator.MoveNext())
{
}
}
[IteratorStateMachine(typeof(<Details>d__23))]
private IEnumerator Details(float value)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Details>d__23(0)
{
<>4__this = this,
value = value
};
}
private void DecreaseDetails()
{
IEnumerator enumerator = Details(1f / textureScale);
while (enumerator.MoveNext())
{
}
}
public void LateUpdate()
{
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)cameraRigController) && Object.op_Implicit((Object)(object)currentCameraObject))
{
((Component)currentCameraObject).transform.rotation = ((Component)cameraRigController).transform.rotation;
}
}
public void OnDisable()
{
if (!enabled)
{
return;
}
if (Object.op_Implicit((Object)(object)weaponCamera))
{
professionalModelComponent.weaponTransform.SetParent(previousWeaponParentTransform, false);
Object.Destroy((Object)(object)((Component)weaponCamera).gameObject);
}
if (Object.op_Implicit((Object)(object)currentCameraObject))
{
Object.Destroy((Object)(object)((Component)currentCameraObject).gameObject);
}
if ((Object)(object)characterModel != (Object)null)
{
CharacterModel obj = characterModel;
int invisibilityCount = obj.invisibilityCount;
obj.invisibilityCount = invisibilityCount - 1;
}
if (Object.op_Implicit((Object)(object)cameraRigController))
{
cameraRigController.baseFov = previousFov;
}
if (Object.op_Implicit((Object)(object)previousCameraObject))
{
((Component)previousCameraObject).gameObject.SetActive(true);
if (Object.op_Implicit((Object)(object)cameraRigController))
{
cameraRigController.sceneCam = previousCameraObject;
}
}
enabled = false;
}
}
public class ProjectileOverchargeComponent : MonoBehaviour
{
public static float maxCharge = 5f;
private float _charge;
public ProjectileController controller;
public BlastAttack blastAttack;
public EntityStateMachine entityStateMachine;
public EntityState entityState;
public Vector3 vel;
public float charge
{
get
{
return _charge;
}
set
{
_charge = value;
if (_charge > maxCharge)
{
Explode();
}
}
}
public void FixedUpdate()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)controller) && Object.op_Implicit((Object)(object)controller.rigidbody))
{
controller.rigidbody.velocity = Vector3.SmoothDamp(controller.rigidbody.velocity, Vector3.zero, ref vel, 0.2f);
}
if (Object.op_Implicit((Object)(object)entityStateMachine) && entityStateMachine.state != entityState)
{
Explode();
}
}
public void ModifyBlastAttack()
{
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
BlastAttack obj = blastAttack;
obj.baseDamage *= charge + 1f;
BlastAttack obj2 = blastAttack;
obj2.radius *= charge + 1f;
blastAttack.position = ((Component)this).transform.position;
}
public void Explode()
{
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0048: Expected O, but got Unknown
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
ModifyBlastAttack();
if (NetworkServer.active)
{
blastAttack.Fire();
}
EffectData val = new EffectData
{
origin = blastAttack.position,
scale = blastAttack.radius
};
EffectManager.SpawnEffect(Assets.Explosion, val, true);
ProjectileExplosion component = ((Component)this).GetComponent<ProjectileExplosion>();
if (Object.op_Implicit((Object)(object)component))
{
Object.Destroy((Object)(object)component);
}
Object.Destroy((Object)(object)((Component)this).gameObject);
}
}
public class UtiltiyCharges : MonoBehaviour
{
[HideInInspector]
public int maxStocks;
[HideInInspector]
public SkillLocator skillLocator;
[HideInInspector]
public List<Image> bars = new List<Image>();
public void FixedUpdate()
{
//IL_00cb: 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)
if ((Object)(object)skillLocator == (Object)null)
{
return;
}
GenericSkill utility = skillLocator.utility;
if ((Object)(object)utility == (Object)null)
{
return;
}
if (maxStocks != utility.maxStock)
{
Rebuild(utility);
}
float num = (utility.rechargeStopwatch + (float)utility.stock * utility.finalRechargeInterval) / utility.finalRechargeInterval;
foreach (Image bar in bars)
{
bar.fillAmount = ((num > 1f) ? 1f : num);
if (bar.fillAmount >= 1f)
{
((Graphic)bar).color = Color.green;
}
else
{
((Graphic)bar).color = Color.red;
}
num -= 1f;
if (num < 0f)
{
num = 0f;
}
}
maxStocks = utility.maxStock;
}
public void Rebuild(GenericSkill utilitySkill)
{
//IL_00e5: 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)
int num = 0;
bool flag = false;
if (maxStocks > utilitySkill.maxStock)
{
num = maxStocks - utilitySkill.maxStock;
flag = true;
}
else
{
num = utilitySkill.maxStock - maxStocks;
}
for (int i = 0; i < num; i++)
{
if (flag)
{
Image val = bars[bars.Count - 1];
bars.Remove(val);
Object.Destroy((Object)(object)((Component)val).gameObject);
}
else
{
GameObject val2 = Object.Instantiate<GameObject>(Assets.UtilitySkillCharge, ((Component)this).transform);
Image component = val2.GetComponent<Image>();
bars.Add(component);
}
}
foreach (Image bar in bars)
{
((Graphic)bar).rectTransform.sizeDelta = new Vector2(8f, 16f);
((Graphic)bar).color = Color.red;
}
}
}
public class HookTracker : MonoBehaviour
{
public Dictionary<Collider, HookTarget> keyValuePairs = new Dictionary<Collider, HookTarget>();
public HookTarget target;
public CharacterBody ownerBody;
public InputBankTest inputBankTest;
public static float radius = 5f;
public static float range = 64f;
public bool active;
public static GameObject indicatorPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/HuntressTrackingIndicator");
public Indicator indicator;
public void Awake()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
//IL_0017: Expected O, but got Unknown
indicator = new Indicator(((Component)this).gameObject, indicatorPrefab);
}
public void FixedUpdate()
{
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_0027: 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)
//IL_003d: 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_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_005a: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Unknown result type (might be due to invalid IL or missing references)
if (!active)
{
target = null;
return;
}
Ray aimRay = GetAimRay();
Collider[] array = Physics.OverlapCapsule(((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * radius, ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * range, radius, LayerMask.op_Implicit(CommonMasks.characterBodies) + LayerMask.op_Implicit(CommonMasks.fakeActorLayers), (QueryTriggerInteraction)0);
float num = 360f;
HookTarget hookTarget = null;
Collider[] array2 = array;
foreach (Collider val in array2)
{
HookTarget value = null;
if (!keyValuePairs.TryGetValue(val, out value))
{
value = ((Component)val).gameObject.AddComponent<HookTarget>();
value.collider = val;
value.keyValuePairs = keyValuePairs;
keyValuePairs.Add(val, value);
}
if (Object.op_Implicit((Object)(object)value) && Object.op_Implicit((Object)(object)value.characterBody) && (Object)(object)ownerBody != (Object)(object)value.characterBody)
{
float num2 = Vector3.Angle(value.position, ((Ray)(ref aimRay)).origin);
if (num2 < num)
{
num = num2;
hookTarget = value;
}
}
}
target = hookTarget;
}
public void Update()
{
if (active)
{
indicator.active = true;
}
else
{
indicator.active = false;
}
indicator.targetTransform = (Object.op_Implicit((Object)(object)target) ? ((Component)target).transform : null);
}
public Ray GetAimRay()
{
//IL_0003: 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_001e: 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_004b: 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_0064: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
Ray result = default(Ray);
((Ray)(ref result)).origin = (Object.op_Implicit((Object)(object)inputBankTest) ? inputBankTest.aimOrigin : ((Component)this).transform.position);
((Ray)(ref result)).direction = (Object.op_Implicit((Object)(object)inputBankTest) ? inputBankTest.aimDirection : ((Component)this).transform.forward);
return result;
}
}
public class HookTarget : MonoBehaviour
{
public CharacterBody characterBody;
public Collider collider;
public Dictionary<Collider, HookTarget> keyValuePairs;
public Vector3 position
{
get
{
//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_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)characterBody == (Object)null)
{
return ((Component)this).transform.position;
}
return characterBody.corePosition;
}
}
public void Awake()
{
if (!Object.op_Implicit((Object)(object)characterBody))
{
characterBody = ((Compon