using System; using System.CodeDom.Compiler; 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 Agents; using AssetShards; using BepInEx; using BepInEx.Configuration; using BepInEx.Unity.IL2CPP; using BepInEx.Unity.IL2CPP.Utils.Collections; using Enemies; using FluffyUnderware.DevTools.Extensions; using GTFO.API; using GameData; using Gear; using HarmonyLib; using Il2CppInterop.Runtime.Injection; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using Localization; using Microsoft.CodeAnalysis; using Player; using SNetwork; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("RecurveBow")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("RecurveBow")] [assembly: AssemblyTitle("RecurveBow")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace RecurveBow { public class ArrowHandler : MonoBehaviour { public static PlayerAgent owner; public static int slot; public Vector3 position; public Vector3 startpos; public Vector3 direction; public Vector3 target; public float speed = 0.7f; public MeleeWeaponFirstPerson weapon; public MeleeWeaponThirdPerson weapontp; public CellSoundPlayer audio; public GameObject arrowtip = new GameObject(); public GameObject arrow = new GameObject(); private float shoottime; private bool isprop; private bool isbuilt; private float soundendtime; public int status; public Vector3 velocity = Vector3.zero; public bool enemyhit; public Agent hitagent; public bool proparrowbuilt; public int arrowindex; public int myslot; public float blinktime; public Light tmpvalo; public NavMarker navmarker; public static GameObject Build(bool isprop) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) GameObject val = GameObject.CreatePrimitive((PrimitiveType)2); val.GetComponent().enabled = false; Object.Destroy((Object)(object)val.GetComponent()); ((Object)val).name = "Bow_Arrow"; MeshRenderer component = val.GetComponent(); ((Renderer)component).sharedMaterial = new Material(Shader.Find("GTFO/Standard")); ((Renderer)component).sharedMaterial.shader = Shader.Find("Cell/Player/CustomGearShader"); ((Renderer)component).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.redTexture); val.transform.localPosition = new Vector3(0f, 0f, 0f); val.transform.localScale = new Vector3(0.01f, 1.3f, 0.005f); val.transform.localEulerAngles = new Vector3(0f, 0f, 0f); GameObject obj = Object.Instantiate(((Component)AssetAPI.GetLoadedAsset("Assets/AssetPrefabs/Items/Gear/Parts/Melee/Heads/Head_Spear_1.prefab").GetComponentInChildren()).gameObject); Object.Destroy((Object)(object)obj.GetComponent()); obj.transform.parent = val.transform; ((Object)obj).name = "Arrow_Tip"; obj.transform.localEulerAngles = new Vector3(270f, 0f, 0f); obj.transform.localScale = new Vector3(19.1f, 20f, 1f); obj.transform.localPosition = new Vector3(0f, 0.9f, 0f); return val; } public void Shoot() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Expected O, but got Unknown //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: 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_0456: Unknown result type (might be due to invalid IL or missing references) LevelAPI.OnLevelCleanup += OnLevelCleanup; if (speed < 0.7f) { speed = 0.7f; } ((Component)this).transform.localScale = new Vector3(0.3f, 0.3f, 0.6f); ((Component)this).transform.position = position; ((Component)this).transform.LookAt(target, ((Component)this).transform.up); Transform transform = ((Component)this).transform; transform.position += ((Component)this).transform.forward * 0.5f; arrow = GameObject.CreatePrimitive((PrimitiveType)2); arrow.transform.parent = ((Component)this).transform; arrow.GetComponent().enabled = false; Object.Destroy((Object)(object)arrow.GetComponent()); arrow.transform.localPosition = new Vector3(0f, 0f, 0f); arrow.transform.localScale = new Vector3(0.05f, 1f, 0.05f); arrow.transform.localEulerAngles = new Vector3(90f, 0f, 0f); ((Object)arrow).name = "Flying_Arrow"; audio = new CellSoundPlayer(); if ((Object)(object)weapon != (Object)null) { ((ItemEquippable)weapon).Sound.Post(803249283u, true); } if ((Object)(object)weapontp != (Object)null) { ((ItemEquippable)weapontp).Sound.Post(803249283u, true); } audio.UpdatePosition(((Component)this).transform.position); audio.Post(2470408129u, true); MeshRenderer component = arrow.GetComponent(); ((Renderer)component).sharedMaterial = new Material(Shader.Find("GTFO/Standard")); ((Renderer)component).sharedMaterial.shader = Shader.Find("Cell/Player/CustomGearShader"); if ((Object)(object)weapon != (Object)null) { ((Renderer)component).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.redTexture); } if ((Object)(object)weapontp != (Object)null) { ((Renderer)component).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.grayTexture); } GameObject loadedAsset = AssetAPI.GetLoadedAsset("Assets/AssetPrefabs/Items/Gear/Parts/Melee/Heads/Head_Spear_1.prefab"); arrowtip = Object.Instantiate(((Component)loadedAsset.GetComponentInChildren()).gameObject); Object.Destroy((Object)(object)arrowtip.GetComponent()); ((Renderer)arrowtip.GetComponentInChildren()).sharedMaterial = new Material(Shader.Find("GTFO/Standard")); ((Renderer)arrowtip.GetComponentInChildren()).sharedMaterial.shader = Shader.Find("Cell/Player/CustomGearShader"); arrowtip.transform.parent = arrow.transform; arrowtip.transform.localPosition = new Vector3(0f, 0.9f, 0f); arrowtip.transform.localEulerAngles = new Vector3(270f, 0f, 0f); ((Object)arrowtip).name = "Arrow_Tip"; arrowtip.transform.localScale = new Vector3(19.1f, 20f, 1f); shoottime = Time.time; startpos = position; ((Component)this).transform.position = position; status = 1; velocity = ((Component)this).transform.forward + direction * (speed * 48f); tmpvalo = arrow.AddComponent(); tmpvalo.range = 1f; tmpvalo.intensity = 0.6f; isbuilt = true; if ((Object)(object)weapon != (Object)null) { Plugin.arrowindex++; } if ((Object)(object)weapon != (Object)null) { arrowindex = Plugin.arrowindex; } if ((Object)(object)weapon != (Object)null) { NetworkAPI.InvokeEvent("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, ((Component)this).transform.forward, speed, 0, 0u), (SNet_ChannelType)2); } } public void OnLevelCleanup() { if ((Object)(object)navmarker != (Object)null) { navmarker.SetVisible(false); Object.Destroy((Object)(object)navmarker); } Object.Destroy((Object)(object)arrowtip); Object.Destroy((Object)(object)arrow); Object.Destroy((Object)(object)this); } public void FixedUpdate() { //IL_0213: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: 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_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0926: Unknown result type (might be due to invalid IL or missing references) //IL_092c: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Unknown result type (might be due to invalid IL or missing references) //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0947: Unknown result type (might be due to invalid IL or missing references) //IL_0952: Unknown result type (might be due to invalid IL or missing references) //IL_0962: Unknown result type (might be due to invalid IL or missing references) //IL_0967: Unknown result type (might be due to invalid IL or missing references) //IL_096c: Unknown result type (might be due to invalid IL or missing references) //IL_097d: Unknown result type (might be due to invalid IL or missing references) //IL_0983: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_0992: Unknown result type (might be due to invalid IL or missing references) //IL_09a8: Unknown result type (might be due to invalid IL or missing references) //IL_09ad: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_049c: 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_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0574: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0622: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Unknown result type (might be due to invalid IL or missing references) //IL_06ec: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_07b4: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07ce: Unknown result type (might be due to invalid IL or missing references) //IL_07d8: Unknown result type (might be due to invalid IL or missing references) //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Expected O, but got Unknown //IL_0766: Unknown result type (might be due to invalid IL or missing references) //IL_076d: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_077d: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_0814: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_08a5: Unknown result type (might be due to invalid IL or missing references) //IL_08b0: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08c2: Unknown result type (might be due to invalid IL or missing references) //IL_08d2: Unknown result type (might be due to invalid IL or missing references) //IL_08d7: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Unknown result type (might be due to invalid IL or missing references) //IL_0906: Unknown result type (might be due to invalid IL or missing references) if (isprop || !isbuilt) { return; } if (enemyhit && !hitagent.Alive && !proparrowbuilt) { Object.Destroy((Object)(object)arrow); arrow = Object.Instantiate(Build(isprop: true)); if ((Object)(object)((Component)weapon).GetComponent() != (Object)null && (Object)(object)navmarker == (Object)null) { navmarker = GuiManager.NavMarkerLayer.PlaceCustomMarker((NavMarkerOption)4, arrow, "goatse", 0f, false); } tmpvalo = arrow.AddComponent(); tmpvalo.range = 1f; ((Object)arrow).name = "Arrow_Prop"; arrow.transform.parent = ((Component)this).transform; ((Component)this).transform.position = hitagent.Position + ((Component)hitagent).transform.up * 0.4f; arrow.transform.localPosition = new Vector3(0f, 0f, 0f); arrow.transform.localScale = new Vector3(0.05f, 2f, 0.05f); proparrowbuilt = true; status = 3; navmarker.m_trackingObj = arrow; navmarker.m_trackingTrans = arrow.transform; navmarker.SetColor(Color.white); if ((Object)(object)weapon != (Object)null) { NetworkAPI.InvokeEvent("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, velocity, speed, 3, 0u), (SNet_ChannelType)2); } } if (enemyhit && (Object)(object)arrow != (Object)null && !proparrowbuilt) { ((Component)this).transform.position = arrow.transform.position; } if (status == 3) { if (audio != null) { audio.Recycle(); audio = null; } if (Time.time - blinktime < 1f) { tmpvalo.intensity = 0.6f; } if (Time.time - blinktime >= 1f && Time.time - blinktime < 2f) { tmpvalo.intensity = 0f; } if (Time.time - blinktime >= 2f) { blinktime = Time.time; } if ((Object)(object)weapon != (Object)null && Vector3.Distance(((Agent)((Item)weapon).Owner).Position, ((Component)this).transform.position) < 3.5f) { BowHandlerFP component = ((Component)weapon).GetComponent(); if ((Object)(object)component != (Object)null) { component.inbackabs++; component.inbackrel = (float)component.inbackabs / (float)component.inbackmax; GuiManager.PlayerLayer.Inventory.SetSlotAmmo((InventorySlot)10, 1, component.inbackabs, component.inbackrel); NetworkAPI.InvokeEvent("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, velocity, speed, 5, 0u), (SNet_ChannelType)2); pPlayerData_Session session = SNet.LocalPlayer.Session; NetworkAPI.InvokeEvent("BowNetInfo", new Plugin.BowNetInfo(0, ((pPlayerData_Session)(ref session)).playerSlotIndex, component.inbackabs), (SNet_ChannelType)2); if ((Object)(object)navmarker != (Object)null) { navmarker.SetVisible(false); Object.Destroy((Object)(object)navmarker); } Object.Destroy((Object)(object)arrowtip); Object.Destroy((Object)(object)arrow); Object.Destroy((Object)(object)this); } } } if (Time.time - shoottime > 10f && status < 3) { if (audio != null) { audio.Stop(); audio.Recycle(); } speed = 0f; velocity = Vector3.zero; status = 3; return; } if (status > 2) { return; } if (status == 2) { audio.Stop(); audio.Recycle(); status = 3; return; } bool flag; RaycastHit val2 = default(RaycastHit); int num; Vector3 val3; if ((Object)(object)weapon != (Object)null) { flag = false; Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)this).transform.position + ((Component)this).transform.forward * 1f, ((Component)this).transform.forward); if (!Physics.Raycast(val, ref val2, 2.5f, LayerManager.MASK_GLUEGUN_TARGETS, (QueryTriggerInteraction)1) && !Physics.Raycast(val, ref val2, 2.5f, LayerManager.MASK_GLUEGUN_TARGETS, (QueryTriggerInteraction)1)) { num = (Physics.CapsuleCast(((Component)this).transform.position, ((Component)this).transform.position + ((Component)this).transform.forward * 1.2f, 0.04f, ((Component)this).transform.forward, ref val2, 2f, LayerManager.MASK_GLUEGUN_TARGETS, (QueryTriggerInteraction)1) ? 1 : 0); if (num == 0) { goto IL_05b1; } } else { num = 1; } if ((Object)(object)((Component)((RaycastHit)(ref val2)).collider).GetComponentInParent() != (Object)null) { GenericDamageComponent componentInParent = ((Component)((RaycastHit)(ref val2)).collider).GetComponentInParent(); PlayerAgent obj = ((Item)weapon).Owner; Vector3 point = ((RaycastHit)(ref val2)).point; val3 = ((RaycastHit)(ref val2)).point - ((Component)this).transform.position; componentInParent.BulletDamage(20f, (Agent)(object)obj, point, ((Vector3)(ref val3)).normalized, Vector3.zero, false, 1f, 1f, 0u); flag = true; } goto IL_05b1; } goto IL_091f; IL_05b1: if (num != 0 && (Object)(object)((Component)((RaycastHit)(ref val2)).collider).GetComponentInParent() != (Object)null) { flag = true; } if (num != 0 && (((Object)((Component)((RaycastHit)(ref val2)).collider).gameObject).name != "Interaction" || flag)) { Collider collider = ((RaycastHit)(ref val2)).collider; val3 = ((Component)collider).transform.position - ((RaycastHit)(ref val2)).point - ((Component)this).transform.position; _ = ((Vector3)(ref val3)).normalized; hitagent = ((Component)collider).GetComponentInParent(); if ((Object)(object)hitagent != (Object)null) { NetworkAPI.InvokeEvent("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, velocity, speed, 4, (uint)(hitagent.m_replicator.Key + 1)), (SNet_ChannelType)2); enemyhit = true; arrow.transform.SetParent(((Component)collider).transform); arrow.transform.localPosition = new Vector3(0f, 0f, 0f); arrow.transform.localEulerAngles = new Vector3(0f, 0f, 180f); arrow.transform.localScale = new Vector3(0.01f, 0.3f, 0.01f); } IDamageable val4 = null; ColliderMaterial component2 = ((Component)collider).GetComponent(); if ((Object)(object)component2 != (Object)null) { val4 = component2.Damageable; } if (val4 == null) { val4 = ((Component)collider).GetComponent(); } if (val4 != null) { IDamageable obj2 = val4; float num2 = speed * (float)Plugin._BowMaxDamage; PlayerAgent obj3 = ((Item)weapon).Owner; Vector3 point2 = ((RaycastHit)(ref val2)).point; val3 = ((RaycastHit)(ref val2)).point - ((Component)this).transform.position; obj2.MeleeDamage(num2, (Agent)(object)obj3, point2, ((Vector3)(ref val3)).normalized, 1f, 1f, 1f, 1f, 1f, false, (DamageNoiseLevel)1, 0u); } else { weapon.DoAttackDamage(new MeleeWeaponDamageData { damageGO = ((Component)((RaycastHit)(ref val2)).collider).gameObject, hitPos = ((RaycastHit)(ref val2)).point, sourcePos = ((Component)this).transform.position }, false); } audio.Post(3762526143u, true); soundendtime = Time.time; status = 2; velocity = Vector3.zero; speed = 0f; if ((Object)(object)((Component)weapon).GetComponent() != (Object)null) { navmarker = GuiManager.NavMarkerLayer.PlaceCustomMarker((NavMarkerOption)4, arrow, "goatse", 0f, false); navmarker.m_trackingObj = arrow; navmarker.m_trackingTrans = arrow.transform; navmarker.SetColor(Color.white); } if (!enemyhit) { Transform transform = ((Component)this).transform; transform.position += ((Component)this).transform.forward * (Vector3.Distance(((Component)this).transform.position, ((RaycastHit)(ref val2)).point) - 0.5f); } if (!enemyhit) { NetworkAPI.InvokeEvent("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, velocity, speed, 2, 0u), (SNet_ChannelType)2); } return; } goto IL_091f; IL_091f: Transform transform2 = ((Component)this).transform; transform2.position += velocity * Time.fixedDeltaTime; velocity += ((Component)this).transform.up * (-9.81f * Time.fixedDeltaTime); ((Component)this).transform.LookAt(((Component)this).transform.position + velocity * Time.fixedDeltaTime); audio.UpdatePosition(((Component)this).transform.position); } public ArrowHandler() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Expected O, but got Unknown //IL_0022: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) pPlayerData_Session session = SNet.LocalPlayer.Session; myslot = ((pPlayerData_Session)(ref session)).playerSlotIndex; ((MonoBehaviour)this)..ctor(); } } internal class BowCreator : MonoBehaviour { public static GameObject Build() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0373: 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_0622: Unknown result type (might be due to invalid IL or missing references) //IL_062c: Expected O, but got Unknown //IL_066a: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(); ((Object)val).hideFlags = (HideFlags)61; val.layer = LayerManager.LAYER_FIRST_PERSON_ITEM; val.transform.position = new Vector3(0f, 1000f, 0f); string path = Path.Combine(Paths.ConfigPath, "../Assets/RecurveBow/recurvebow1.png"); if (!File.Exists(path)) { Debug.Log(Object.op_Implicit("RecurveBow - cant find bow image")); return null; } byte[] array = File.ReadAllBytes(path); Texture2D val2 = new Texture2D(237, 693, (TextureFormat)5, false); ImageConversion.LoadImage(val2, Il2CppStructArray.op_Implicit(array)); Dictionary dictionary = new Dictionary(); Dictionary dictionary2 = new Dictionary(); List list = new List(); new List(); List list2 = new List(); bool flag = false; List list3 = new List(); for (int i = 0; i < 693; i += 5) { for (int j = 0; j < 237; j++) { if (flag && j == 0) { flag = false; } if (!flag && val2.GetPixel(j, i).a != 0f) { dictionary[i] = j; flag = true; } if (flag && val2.GetPixel(j, i).a == 0f) { dictionary2[i] = j - 1; flag = false; } } } Debug.Log(Object.op_Implicit($"RecurveBow - rowstart {dictionary.Count} rowend {dictionary2.Count}")); float num = 0.02f; _ = 1 / dictionary2.Count(); foreach (KeyValuePair item in dictionary2) { if (!dictionary.ContainsKey(item.Key)) { Debug.Log(Object.op_Implicit($"RecurveBow - rivi {item.Key} ei loydy")); continue; } float num2 = (float)item.Key / 693f - 0.5f; float num3 = (float)dictionary[item.Key] / 237f - 0.48f; float num4 = (float)dictionary2[item.Key] / 237f - 0.48f; list.Add(new Vector3(num, num2, num3)); list2.Add(new Vector2(num3, num2)); list.Add(new Vector3(num, num2, num3)); list2.Add(new Vector2(num3, num2)); list.Add(new Vector3(num, num2, num4)); list2.Add(new Vector2(num4, num2)); list.Add(new Vector3(num, num2, num4)); list2.Add(new Vector2(num4, num2)); list.Add(new Vector3(num - 0.04f, num2, num3)); list2.Add(new Vector2(num3, num2)); list.Add(new Vector3(num - 0.04f, num2, num3)); list2.Add(new Vector2(num3, num2)); list.Add(new Vector3(num - 0.04f, num2, num4)); list2.Add(new Vector2(num4, num2)); list.Add(new Vector3(num - 0.04f, num2, num4)); list2.Add(new Vector2(num4, num2)); } for (int k = 0; k < list.Count - 8; k += 8) { list3.Add(k); list3.Add(k + 8); list3.Add(k + 2); list3.Add(k + 8); list3.Add(k + 10); list3.Add(k + 2); list3.Add(k + 3); list3.Add(k + 11); list3.Add(k + 6); list3.Add(k + 11); list3.Add(k + 14); list3.Add(k + 6); list3.Add(k + 7); list3.Add(k + 15); list3.Add(k + 4); list3.Add(k + 15); list3.Add(k + 12); list3.Add(k + 4); list3.Add(k + 5); list3.Add(k + 13); list3.Add(k + 1); list3.Add(k + 13); list3.Add(k + 9); list3.Add(k + 1); } Debug.Log(Object.op_Implicit($"RecurveBow - vertices {list.Count} triangles {list3.Count}")); MeshFilter val3 = val.AddComponent(); MeshRenderer obj = val.AddComponent(); val3.mesh.vertices = Il2CppStructArray.op_Implicit(list.ToArray()); val3.mesh.triangles = Il2CppStructArray.op_Implicit(list3.ToArray()); val3.mesh.uv = Il2CppStructArray.op_Implicit(list2.ToArray()); val3.mesh.RecalculateNormals(); val3.mesh.RecalculateBounds(); val3.mesh.RecalculateTangents(); Debug.Log(Object.op_Implicit($"RecurveBow - mesh vertices {((Il2CppArrayBase)(object)val3.mesh.vertices).Length} triangles {((Il2CppArrayBase)(object)val3.mesh.triangles).Length} uv {((Il2CppArrayBase)(object)val3.mesh.uv).Length}")); ((Renderer)obj).sharedMaterial = new Material(Shader.Find("GTFO/Standard")); ((Renderer)obj).sharedMaterial.shader = Shader.Find("Cell/Player/CustomGearShader"); ((Renderer)obj).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.blackTexture); val.transform.localScale = new Vector3(1f, 1f, 1f); val.transform.localEulerAngles = new Vector3(0f, 0f, 0f); return val; } } internal class BowHandlerFP : MonoBehaviour { public bool arrowshouldfire; private eMeleeWeaponState prevstate; public bool animneedsbreak; public bool animrunning; private string animname = "Idle"; public string nextanim = ""; private MeleeWeaponFirstPerson weapon; private PlayerAgent plr; public bool started; private MWS_Base mystate = new MWS_Base(); private GameObject sight; private Transform meleealign = new Transform(); private Texture2D bowpic2 = new Texture2D(512, 512); private float origfov; public GameObject arrow = new GameObject(); public GameObject handarrow = new GameObject(); public GameObject knifepart = new GameObject(); private float shoveTime; public int inbackabs = Plugin._BowMaxAmmo; public int clipabs; public float inbackrel; public int inbackmax = Plugin._BowMaxAmmo; private bool reloadrunning; private void Awake() { string path = Path.Combine(Paths.ConfigPath, "../Assets/RecurveBow/recurvebowcamo.png"); if (File.Exists(path)) { Debug.Log(Object.op_Implicit("RecurveBow - loading bow texture from file recurvebowcamo.png")); byte[] array = File.ReadAllBytes(path); ImageConversion.LoadImage(bowpic2, Il2CppStructArray.op_Implicit(array)); bowpic2.Apply(); Object.DontDestroyOnLoad((Object)(object)bowpic2); } ((Object)bowpic2).hideFlags = (HideFlags)61; } public void BeginGame() { //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Expected O, but got Unknown //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_04a1: Unknown result type (might be due to invalid IL or missing references) animneedsbreak = false; animname = "Idle"; animrunning = false; weapon = ((Component)this).GetComponent(); if ((Object)(object)weapon == (Object)null || (Object)(object)((Component)this).GetComponentInParent() == (Object)null) { return; } plr = ((Item)weapon).Owner; foreach (Transform componentsInChild in ((Component)weapon).GetComponentsInChildren()) { if (((Object)componentsInChild).name == "melee_align") { meleealign = componentsInChild; } } ((ItemEquippable)weapon).GearPartHolder.SightPart.transform.localScale = new Vector3(1f, 1f, 1f); ((ItemEquippable)weapon).GearPartHolder.SightPart.transform.localPosition = new Vector3(0f, 0.1f, 0f); ((ItemEquippable)weapon).GearPartHolder.SightPart.transform.localEulerAngles = new Vector3(0f, 0f, 90f); ((Component)meleealign).transform.localPosition = new Vector3(0.14f, 0.2f, -0.2f); ((Component)meleealign).transform.localEulerAngles = new Vector3(335f, 340f, 216f); ((Behaviour)((Component)weapon).GetComponentInChildren()).enabled = false; ((ItemEquippable)weapon).StopAnimationSequenceCoroutine(); origfov = CellSettingsManager.SettingsData.Video.Fov.Value; string path = Path.Combine(Paths.ConfigPath, "../Assets/RecurveBow/recurvebowcamo.png"); if (File.Exists(path)) { ((Renderer)((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.GetComponentInChildren()).sharedMaterial.SetTexture("_MainTex", (Texture)(object)bowpic2); } if (!File.Exists(path)) { Debug.Log(Object.op_Implicit("RecurveBow - cant find bow texture")); } GameObject loadedAsset = AssetAPI.GetLoadedAsset("Assets/AssetPrefabs/Items/Gear/Parts/Melee/Heads/Head_Knife_1.prefab"); knifepart = Object.Instantiate(loadedAsset); ((Object)knifepart).name = "Bow_Knife_Attachment"; knifepart.transform.parent = ((Component)((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.GetComponentInChildren()).gameObject.transform; knifepart.transform.localPosition = new Vector3(0f, 0f, 0f); knifepart.transform.localEulerAngles = new Vector3(0f, 0f, 0f); knifepart.transform.localScale = new Vector3(1f, 1f, 1f); GameObject gameObject = ((Component)knifepart.GetComponentInChildren()).gameObject; gameObject.transform.localScale = new Vector3(0.5f, 0.2f, 1.2f); gameObject.transform.localPosition = new Vector3(0f, 0.05f, 0f); gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 180f); gameObject.layer = LayerManager.LAYER_FIRST_PERSON_ITEM; arrow = Object.Instantiate(ArrowHandler.Build(isprop: true)); arrow.transform.parent = ((Component)((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.GetComponentInChildren()).gameObject.transform; arrow.transform.localEulerAngles = new Vector3(90f, 0f, 0f); arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.6f); arrow.transform.localScale = new Vector3(0.013f, 1.2839f, 0.005f); arrow.gameObject.SetActive(false); Transform parent = new Transform(); foreach (Transform componentsInChild2 in ((Component)plr.FPItemHolder).GetComponentsInChildren()) { if (((Object)componentsInChild2).name == "RightIndex1") { parent = componentsInChild2; } } handarrow = Object.Instantiate(ArrowHandler.Build(isprop: true)); handarrow.transform.parent = parent; handarrow.transform.localEulerAngles = new Vector3(325f, 62f, 130f); handarrow.transform.localPosition = new Vector3(0f, 0f, 0f); handarrow.SetActive(false); inbackrel = (float)inbackabs / (float)inbackmax; GuiManager.PlayerLayer.Inventory.SetSlotAmmo((InventorySlot)10, 0, inbackabs, inbackrel); LevelAPI.OnLevelCleanup += Cleanup; started = true; } private void FixedUpdate() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Invalid comparison between Unknown and I4 //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Invalid comparison between Unknown and I4 //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Invalid comparison between Unknown and I4 //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) if (!started) { return; } if (clipabs <= 0) { arrowshouldfire = false; arrow.gameObject.SetActive(false); if (inbackabs > 0) { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimReload()), (Action)null); } } if (clipabs > 0) { arrow.gameObject.SetActive(true); } if ((int)weapon.CurrentStateName == 13 && InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0) && (int)prevstate != 13) { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimShove()), (Action)null); } else { if ((int)weapon.CurrentStateName == 13 && (int)prevstate == 13) { return; } if (!InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && !InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && !animrunning) { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimIdle()), (Action)null); } else if (!InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && !InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && animrunning && animname != "Idle" && !InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0)) { nextanim = "Idle"; animneedsbreak = true; } else if (!InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && animrunning && animname == "Aim") { nextanim = "Idle"; animneedsbreak = true; } else { if ((InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && animrunning && animname == "Aim") || (InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && animrunning && animname == "ChargeArrow")) { return; } if (InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && !InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && animrunning && animname != "Aim") { nextanim = "Aim"; animneedsbreak = true; } else { if (InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && animrunning && animname == "Aim") { return; } prevstate = weapon.CurrentStateName; if (animrunning && animneedsbreak) { return; } if (!animrunning && animneedsbreak) { animneedsbreak = false; } if (!animrunning) { if (nextanim == "Idle") { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimIdle()), (Action)null); } if (nextanim == "Aim") { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimAim()), (Action)null); } if (nextanim == "ChargeMelee") { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimChargeMelee()), (Action)null); } if (nextanim == "ChargeArrow") { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimChargeArrow()), (Action)null); } if (nextanim == "Shove") { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimShove()), (Action)null); } ((Item)weapon).LeftHandGripTrans.localPosition = new Vector3(0.11f, 0.2f, -0.29f); ((Item)weapon).LeftHandGripTrans.localEulerAngles = new Vector3(42f, 92f, 333f); ((Item)weapon).RightHandGripTrans.position = ((Item)weapon).LeftHandGripTrans.position - ((Item)weapon).LeftHandGripTrans.forward * 0.3f; nextanim = "Idle"; } } } } } private IEnumerator AnimIdle() { arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.6f); plr.FPSCamera.OverrideFieldOfView(origfov); pPlayerData_Session session = SNet.LocalPlayer.Session; NetworkAPI.InvokeEvent("BowNetInfo", new Plugin.BowNetInfo(0, ((pPlayerData_Session)(ref session)).playerSlotIndex, inbackabs), (SNet_ChannelType)2); if (clipabs == 0 && inbackabs == 0) { session = SNet.LocalPlayer.Session; NetworkAPI.InvokeEvent("BowNetInfo", new Plugin.BowNetInfo(6, ((pPlayerData_Session)(ref session)).playerSlotIndex, inbackabs), (SNet_ChannelType)2); } animname = "Idle"; nextanim = ""; animrunning = true; animneedsbreak = false; float starttime = Time.time; bool animdone = false; float progress = 0f; Vector3 origpos = ((Item)weapon).LeftHandGripTrans.localPosition; Vector3 origeul = ((Item)weapon).LeftHandGripTrans.localEulerAngles; Vector3 maorigpos = ((Component)meleealign).transform.localPosition; Vector3 maorigeul = ((Component)meleealign).transform.localEulerAngles; Vector3 origrpos = ((Item)weapon).RightHandGripTrans.localPosition; Vector3 origreul = ((Item)weapon).RightHandGripTrans.localEulerAngles; while (true) { if (((int)weapon.CurrentStateName == 7) | ((int)weapon.CurrentStateName == 9)) { nextanim = "ChargeMelee"; animneedsbreak = true; animrunning = false; yield break; } if ((int)weapon.CurrentStateName == 13 && (int)prevstate != 13 && InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0)) { animname = "Shove"; CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimShove()), (Action)null); yield break; } prevstate = (eMeleeWeaponState)1; if (animneedsbreak) { break; } if (progress < 1f) { progress = (Time.time - starttime) * 4f; } if (!animdone && progress >= 1f) { animdone = true; progress = 0.99999f; } if (progress < 1f) { ((Component)meleealign).transform.localPosition = Vector3.Lerp(maorigpos, new Vector3(0.14f, 0.2f, -0.2f), progress); ((Component)meleealign).transform.localEulerAngles = Vector3.Lerp(maorigeul, new Vector3(335f, 340f, 216f), progress); ((Item)weapon).LeftHandGripTrans.localPosition = Vector3.Lerp(origpos, new Vector3(0.11f, 0.2f, -0.29f), progress); ((Item)weapon).LeftHandGripTrans.localEulerAngles = Vector3.Lerp(origeul, new Vector3(42f, 92f, 333f), progress); ((Item)weapon).RightHandGripTrans.localPosition = Vector3.Lerp(origrpos, new Vector3(-0.26f, 0f, -0.53f), progress); ((Item)weapon).RightHandGripTrans.localEulerAngles = Vector3.Lerp(origreul, new Vector3(36f, 64f, 327f), progress); } yield return null; } animrunning = false; animname = ""; } private IEnumerator AnimAim() { pPlayerData_Session session = SNet.LocalPlayer.Session; NetworkAPI.InvokeEvent("BowNetInfo", new Plugin.BowNetInfo(2, ((pPlayerData_Session)(ref session)).playerSlotIndex, inbackabs), (SNet_ChannelType)2); arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.6f); animname = "Aim"; nextanim = ""; animrunning = true; animneedsbreak = false; float progress = 0f; Vector3 origpos = ((Item)weapon).LeftHandGripTrans.localPosition; Vector3 origeul = ((Item)weapon).LeftHandGripTrans.localEulerAngles; Vector3 maorigpos = ((Component)meleealign).transform.localPosition; Vector3 maorigeul = ((Component)meleealign).transform.localEulerAngles; plr.FPSCamera.OverrideFieldOfView((float)((ItemEquippable)weapon).ItemFPSData.ItemCameraFOVZoom); float starttime = Time.time; bool animdone = false; while (true) { if ((((int)weapon.CurrentStateName == 13) | ((int)prevstate != 13)) && InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0) && Time.time - shoveTime > 1.5f) { prevstate = (eMeleeWeaponState)1; animname = "Shove"; CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimShove()), (Action)null); yield break; } prevstate = (eMeleeWeaponState)1; if (clipabs == 1 && (((int)weapon.CurrentStateName == 7) | ((int)weapon.CurrentStateName == 9))) { nextanim = "ChargeArrow"; animneedsbreak = true; animrunning = false; yield break; } if (animneedsbreak | !InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0)) { break; } if (progress < 1f) { progress = (Time.time - starttime) * 4f; } if (!animdone && progress >= 1f) { animdone = true; progress = 0.99999f; } if (progress < 1f) { ((Component)meleealign).transform.localPosition = Vector3.Lerp(maorigpos, new Vector3(0.26f, 0.14f, -0.285f), progress); ((Component)meleealign).transform.localEulerAngles = Vector3.Lerp(maorigeul, new Vector3(333f, 334f, 258f), progress); ((Item)weapon).LeftHandGripTrans.localPosition = Vector3.Lerp(origpos, new Vector3(0.22f, 0.145f, -0.37f), progress); ((Item)weapon).LeftHandGripTrans.localEulerAngles = Vector3.Lerp(origeul, new Vector3(24f, 92f, 333f), progress); } yield return null; } animrunning = false; animname = ""; nextanim = "Idle"; } public IEnumerator AnimShove() { animrunning = true; animname = "Shove"; prevstate = (eMeleeWeaponState)13; plr.FPSCamera.OverrideFieldOfView(origfov); Debug.Log(Object.op_Implicit("RecurveBow - shove coroutine")); shoveTime = Time.time; ((Component)meleealign).transform.localPosition = new Vector3(0.14f, 0.3f, -0.1f); ((Component)meleealign).transform.localEulerAngles = new Vector3(335f, 340f, 216f); ((Item)weapon).LeftHandGripTrans.localPosition = new Vector3(0.11f, 0.3f, -0.19f); ((Item)weapon).LeftHandGripTrans.localEulerAngles = new Vector3(42f, 92f, 333f); ((Item)weapon).RightHandGripTrans.localPosition = new Vector3(0.17f, 0.13f, -0.15f); ((Item)weapon).RightHandGripTrans.localEulerAngles = new Vector3(36f, 64f, 327f); yield return (object)new WaitForSeconds(0.25f); nextanim = "Idle"; animneedsbreak = false; animrunning = false; yield return null; } private IEnumerator AnimChargeMelee() { plr.FPSCamera.OverrideFieldOfView(origfov); animname = "ChargeMelee"; nextanim = ""; animrunning = true; animneedsbreak = false; while (true) { if (((int)weapon.CurrentStateName == 14) | ((int)weapon.CurrentStateName == 15) | InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0)) { pPlayerData_Session session = SNet.LocalPlayer.Session; NetworkAPI.InvokeEvent("BowNetInfo", new Plugin.BowNetInfo(0, ((pPlayerData_Session)(ref session)).playerSlotIndex, inbackabs), (SNet_ChannelType)2); weapon.ChangeState((eMeleeWeaponState)1); nextanim = "Idle"; animneedsbreak = true; animrunning = false; yield break; } if (((int)weapon.CurrentStateName == 11) | ((int)weapon.CurrentStateName == 12) | ((int)weapon.CurrentStateName == 5) | ((int)weapon.CurrentStateName == 6) | ((int)weapon.CurrentStateName == 3) | ((int)weapon.CurrentStateName == 4) | ((int)weapon.CurrentStateName == 8) | ((int)weapon.CurrentStateName == 10)) { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimShove()), (Action)null); yield break; } if (animneedsbreak) { break; } yield return null; } animrunning = false; } private IEnumerator AnimChargeArrow() { pPlayerData_Session session = SNet.LocalPlayer.Session; NetworkAPI.InvokeEvent("BowNetInfo", new Plugin.BowNetInfo(4, ((pPlayerData_Session)(ref session)).playerSlotIndex, inbackabs), (SNet_ChannelType)2); animname = "ChargeArrow"; nextanim = ""; animrunning = true; animneedsbreak = false; float aimstarttime = Time.time; arrowshouldfire = true; while (true) { if (((int)weapon.CurrentStateName == 14) | ((int)weapon.CurrentStateName == 15) | InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0)) { prevstate = (eMeleeWeaponState)13; weapon.ChangeState((eMeleeWeaponState)1); nextanim = "Aim"; animneedsbreak = true; animrunning = false; yield break; } if (((int)weapon.CurrentStateName == 11) | ((int)weapon.CurrentStateName == 12) | ((int)weapon.CurrentStateName == 5) | ((int)weapon.CurrentStateName == 6) | ((int)weapon.CurrentStateName == 3) | ((int)weapon.CurrentStateName == 4) | ((int)weapon.CurrentStateName == 8) | ((int)weapon.CurrentStateName == 10) | ((int)weapon.CurrentStateName == 5) | ((int)weapon.CurrentStateName == 6) | ((int)weapon.CurrentStateName == 3) | ((int)weapon.CurrentStateName == 4)) { nextanim = "Aim"; animneedsbreak = true; animrunning = false; yield break; } if (animneedsbreak) { break; } ((Component)meleealign).transform.localPosition = new Vector3(0.26f, 0.14f, -0.285f); ((Component)meleealign).transform.localEulerAngles = new Vector3(333f, 334f, 258f); ((Item)weapon).LeftHandGripTrans.localPosition = new Vector3(0.22f, 0.145f, -0.37f); ((Item)weapon).LeftHandGripTrans.localEulerAngles = new Vector3(24f, 92f, 333f); float num = (Time.time - aimstarttime) / ((ItemEquippable)weapon).MeleeAnimationData.MaxDamageChargeTime; if (num > 1f) { num = 1f; } float num2 = num * 1.7f; arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.6f - num2); yield return null; } animrunning = false; } private IEnumerator AnimReload() { if (reloadrunning) { yield break; } reloadrunning = true; pPlayerData_Session session = SNet.LocalPlayer.Session; NetworkAPI.InvokeEvent("BowNetInfo", new Plugin.BowNetInfo(1, ((pPlayerData_Session)(ref session)).playerSlotIndex, inbackabs), (SNet_ChannelType)2); float progress = 0f; Vector3 origpos = ((Item)weapon).RightHandGripTrans.localPosition; Vector3 origeul = ((Item)weapon).RightHandGripTrans.localEulerAngles; float starttime = Time.time; bool animdone = false; while (!animdone) { if (progress < 1f) { progress = (Time.time - starttime) * 2f; } if (!animdone && progress >= 1f) { animdone = true; progress = 0.99999f; } if (progress < 1f) { ((Component)((Item)weapon).RightHandGripTrans).transform.localPosition = Vector3.Lerp(origpos, new Vector3(1.04f, -0.1f, 1.47f), progress); ((Component)((Item)weapon).RightHandGripTrans).transform.localEulerAngles = Vector3.Lerp(origeul, new Vector3(36f, 90f, 327f), progress); } yield return null; } try { handarrow.SetActive(true); } catch (Exception) { } animdone = false; progress = 0f; starttime = Time.time; Vector3 newpos = ((Item)weapon).RightHandGripTrans.localPosition; Vector3 neweul = ((Item)weapon).RightHandGripTrans.localEulerAngles; while (!animdone) { if (progress < 1f) { progress = (Time.time - starttime) * 2f; } if (!animdone && progress >= 1f) { animdone = true; progress = 0.99999f; } if (progress < 1f) { ((Item)weapon).RightHandGripTrans.localPosition = Vector3.Lerp(newpos, new Vector3(-0.26f, 0f, -0.53f), progress); ((Item)weapon).RightHandGripTrans.localEulerAngles = Vector3.Lerp(neweul, new Vector3(36f, 64f, 327f), progress); } yield return null; } try { handarrow.SetActive(false); } catch (Exception) { } arrow.SetActive(true); if (inbackabs > 0) { inbackabs += -1; } clipabs = 1; inbackrel = (float)inbackabs / (float)inbackmax; GuiManager.PlayerLayer.Inventory.SetSlotAmmo((InventorySlot)10, 1, inbackabs, inbackrel); reloadrunning = false; session = SNet.LocalPlayer.Session; NetworkAPI.InvokeEvent("BowNetInfo", new Plugin.BowNetInfo(2, ((pPlayerData_Session)(ref session)).playerSlotIndex, inbackabs), (SNet_ChannelType)2); yield return null; } private void Cleanup() { Object.Destroy((Object)(object)arrow); Object.Destroy((Object)(object)handarrow); Object.Destroy((Object)(object)knifepart); started = false; } } internal class BowHandlerTP : MonoBehaviour { private float begintime; public bool arrowloaded; public bool arrowshouldfire; private eMeleeWeaponState prevstate; public bool animneedsbreak; public bool animrunning; private string animname = "Idle"; public string nextanim = ""; public MeleeWeaponThirdPerson weapon; private PlayerAgent plr; public bool started; private MWS_Base mystate = new MWS_Base(); private GameObject sight; private Transform meleealign = new Transform(); private Texture2D bowpic2 = new Texture2D(512, 512); public GameObject arrow = new GameObject(); public GameObject knife = new GameObject(); public GameObject handarrow = new GameObject(); private float shoveTime; public int inbackabs = 10; public int clipabs; public float inbackrel; public int inbackmax = Plugin._BowMaxAmmo; public bool aimrunning; public bool reloadrunning; public bool chargearrowrunning; public bool shoverunning; public Transform lefthand; public Transform righthand; public Transform head; public GameObject quiver; public Transform backpackalign; public GameObject[] backpackammo = (GameObject[])(object)new GameObject[10]; private void Awake() { string path = Path.Combine(Paths.ConfigPath, "../Assets/RecurveBow/recurvebowcamo.png"); if (File.Exists(path)) { Debug.Log(Object.op_Implicit("RecurveBow - loading bow texture from file recurvebowcamo.png")); byte[] array = File.ReadAllBytes(path); ImageConversion.LoadImage(bowpic2, Il2CppStructArray.op_Implicit(array)); bowpic2.Apply(); Object.DontDestroyOnLoad((Object)(object)bowpic2); } ((Object)bowpic2).hideFlags = (HideFlags)61; } public void BeginGame() { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_0631: Unknown result type (might be due to invalid IL or missing references) //IL_0655: Unknown result type (might be due to invalid IL or missing references) //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_06a8: Unknown result type (might be due to invalid IL or missing references) //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Unknown result type (might be due to invalid IL or missing references) //IL_0754: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_079c: Unknown result type (might be due to invalid IL or missing references) //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Expected O, but got Unknown //IL_0867: Unknown result type (might be due to invalid IL or missing references) //IL_088b: Unknown result type (might be due to invalid IL or missing references) begintime = Time.time; Debug.Log(Object.op_Implicit("recurvebow - bowhandlertp trying to start..")); weapon = ((Component)this).gameObject.GetComponent(); if ((Object)(object)weapon == (Object)null) { return; } plr = ((Item)weapon).Owner; foreach (Transform componentsInChild in ((Component)((Item)weapon).Owner.AnimatorBody).GetComponentsInChildren()) { if (((Object)componentsInChild).name.Contains("MeleeWeaponSlot_bp")) { backpackalign = ((Component)componentsInChild).transform; } } quiver = GameObject.CreatePrimitive((PrimitiveType)2); ((Object)quiver).name = "RecurveBow_Quiver"; Object.Destroy((Object)(object)quiver.GetComponentInChildren()); ((Renderer)quiver.GetComponent()).material.SetTexture("_MainTex", (Texture)(object)bowpic2); quiver.transform.SetParent(backpackalign); quiver.transform.localEulerAngles = Vector3.zero; quiver.transform.localPosition = new Vector3(0.1f, 0.1f, 0.1f); quiver.transform.localScale = new Vector3(0.1f, 0.3f, 0.1f); ((Item)weapon).Owner.m_movingCuller.CullBucket.AddRenderer((Renderer)(object)quiver.GetComponentInChildren()); int num = 0; for (float num2 = -0.14f; num2 < 0.15f; num2 += 0.14f) { for (float num3 = -0.14f; num3 < 0.15f; num3 += 0.14f) { GameObject val = Object.Instantiate(ArrowHandler.Build(isprop: true)); val.GetComponentInChildren().enabled = false; ((Renderer)val.GetComponentInChildren()).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.grayTexture); ((Object)val.transform).name = "BackPackArrow"; val.transform.SetParent(quiver.transform); val.transform.localScale = new Vector3(0.05f, 1.2f, 0.05f); val.transform.localPosition = new Vector3(num2, 0.5f, num3); val.transform.localEulerAngles = new Vector3(0f, 0f, 180f); backpackammo[num] = val; num++; } } foreach (Transform componentsInChild2 in ((Component)this).GetComponentsInChildren()) { if (((Object)componentsInChild2).name == "Bow_GripAlign") { meleealign = componentsInChild2; } } foreach (Transform componentsInChild3 in ((Component)((Item)weapon).Owner.AnimatorBody).GetComponentsInChildren()) { if (((Object)componentsInChild3).name == "Head") { head = componentsInChild3; } } foreach (Transform componentsInChild4 in ((Component)weapon).GetComponentsInChildren()) { if (((Object)componentsInChild4).name == "RightHand") { righthand = componentsInChild4; } } foreach (Transform componentsInChild5 in ((Component)weapon).GetComponentsInChildren()) { if (((Object)componentsInChild5).name == "LeftHand") { lefthand = componentsInChild5; } } if ((Object)(object)righthand != (Object)null) { righthand.localPosition = new Vector3(0.04f, 0.1f, -0.23f); righthand.localEulerAngles = new Vector3(281f, 11f, 97f); } if ((Object)(object)lefthand != (Object)null) { lefthand.localPosition = new Vector3(0f, -0.08f, -0.1f); lefthand.localEulerAngles = new Vector3(285f, 264f, 176f); } if ((Object)(object)head != (Object)null) { ((Component)weapon).transform.SetParent(head); } ((Component)weapon).transform.localPosition = new Vector3(0.06f, -0.2f, 0.63f); ((Component)weapon).transform.localEulerAngles = new Vector3(13f, 347f, 300f); ((ItemEquippable)weapon).GearPartHolder.SightPart.transform.localScale = new Vector3(1f, 1f, 1f); ((ItemEquippable)weapon).GearPartHolder.SightPart.transform.localPosition = new Vector3(0f, 0.1f, 0f); ((ItemEquippable)weapon).GearPartHolder.SightPart.transform.localEulerAngles = new Vector3(0f, 0f, 90f); ((Behaviour)((Component)weapon).GetComponentInChildren()).enabled = false; ((ItemEquippable)weapon).StopAnimationSequenceCoroutine(); string path = Path.Combine(Paths.ConfigPath, "../Assets/RecurveBow/recurvebowcamo.png"); if (File.Exists(path)) { ((Renderer)((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.GetComponentInChildren()).sharedMaterial.SetTexture("_MainTex", (Texture)(object)bowpic2); } if (!File.Exists(path)) { Debug.Log(Object.op_Implicit("RecurveBow - cant find bow texture")); } GameObject loadedAsset = AssetAPI.GetLoadedAsset("Assets/AssetPrefabs/Items/Gear/Parts/Melee/Heads/Head_Knife_1.prefab"); knife = Object.Instantiate(loadedAsset); ((Object)knife).name = "Bow_Knife_Attachment"; knife.transform.parent = ((Component)((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.GetComponentInChildren()).gameObject.transform; knife.transform.localPosition = new Vector3(0f, 0f, 0f); knife.transform.localEulerAngles = new Vector3(0f, 0f, 0f); knife.transform.localScale = new Vector3(1f, 1.5f, 1.5f); GameObject gameObject = ((Component)knife.GetComponentInChildren()).gameObject; gameObject.transform.localScale = new Vector3(0.5f, 0.2f, 1.2f); gameObject.transform.localPosition = new Vector3(0f, 0.035f, 0f); gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 180f); gameObject.layer = LayerManager.LAYER_THIRD_PERSON_ITEM; arrow = Object.Instantiate(ArrowHandler.Build(isprop: true)); arrow.transform.parent = ((Component)((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.GetComponentInChildren()).gameObject.transform; arrow.transform.localScale = new Vector3(0.008f, 1.2f, 0.005f); arrow.transform.localEulerAngles = new Vector3(90f, 0f, 0f); arrow.transform.localPosition = new Vector3(-0.03f, 0.01f, 0.81f); ((Renderer)arrow.GetComponentInChildren()).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.grayTexture); arrow.gameObject.SetActive(false); Transform parent = new Transform(); foreach (Transform componentsInChild6 in ((Component)((Item)weapon).Owner.AnimatorBody).GetComponentsInChildren()) { if (((Object)componentsInChild6).name == "RightIndex1") { parent = componentsInChild6; } } handarrow = Object.Instantiate(ArrowHandler.Build(isprop: true)); handarrow.transform.parent = parent; handarrow.transform.localEulerAngles = new Vector3(64f, 31f, 70f); handarrow.transform.localPosition = new Vector3(0f, 0f, 0f); ((Renderer)handarrow.GetComponentInChildren()).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.grayTexture); handarrow.gameObject.SetActive(false); ((Item)weapon).Owner.SyncIK.SetRightArmTarget(righthand); ((Item)weapon).Owner.SyncIK.SetRightArmWeight(1f); ((Item)weapon).Owner.SyncIK.SetLeftArmTarget(lefthand); ((Item)weapon).Owner.SyncIK.SetLeftArmWeight(1f); inbackrel = (float)inbackabs / (float)inbackmax; clipabs = 1; started = true; StartIdle(); } public void OnWield() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) knife.SetActive(true); if (arrowloaded) { arrow.SetActive(true); } if ((Object)(object)righthand != (Object)null) { righthand.localPosition = new Vector3(0.04f, 0.1f, -0.23f); righthand.localEulerAngles = new Vector3(281f, 11f, 97f); } if ((Object)(object)lefthand != (Object)null) { lefthand.localPosition = new Vector3(0f, -0.01f, -0.1f); lefthand.localEulerAngles = new Vector3(285f, 264f, 176f); } if ((Object)(object)head != (Object)null) { ((Component)weapon).transform.SetParent(head); } ((Component)weapon).transform.localPosition = new Vector3(0.06f, -0.2f, 0.63f); ((Component)weapon).transform.localEulerAngles = new Vector3(13f, 347f, 300f); ((Behaviour)((Component)weapon).GetComponentInChildren()).enabled = false; ((ItemEquippable)weapon).StopAnimationSequenceCoroutine(); ((Item)weapon).Owner.SyncIK.SetRightArmTarget(righthand); ((Item)weapon).Owner.SyncIK.SetRightArmWeight(1f); ((Item)weapon).Owner.SyncIK.SetLeftArmTarget(lefthand); ((Item)weapon).Owner.SyncIK.SetLeftArmWeight(1f); ((Behaviour)((Item)weapon).Owner.SyncIK.m_rightArmIK).enabled = true; StartIdle(); } private void Update() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0256: 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_025d: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: 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_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //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_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) if (Time.time - begintime < 2f || !started) { return; } if (clipabs == 0) { arrowloaded = false; arrowshouldfire = false; arrow.SetActive(false); } if (clipabs == 1) { arrowloaded = true; arrowshouldfire = true; arrow.SetActive(true); } Vector3 val = ((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.transform.position + ((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.transform.up * 0.7f; val += -(((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.transform.forward * 0.11f); Vector3 val2 = ((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.transform.position - ((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.transform.forward * 0.11f; Vector3 val3 = ((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.transform.position - ((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.transform.up * 0.7f; val3 += -(((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.transform.forward * 0.11f); if (inbackabs == 0) { for (int i = 0; i < 9; i++) { backpackammo[i].SetActive(false); } } if (inbackabs > 0) { for (int j = 1; j < 10; j++) { if (inbackabs >= j) { backpackammo[j - 1].SetActive(true); } if (inbackabs < j) { backpackammo[j - 1].SetActive(false); } } } if ((Object)(object)((Item)weapon).Owner.Inventory.WieldedItem != (Object)(object)weapon) { knife.SetActive(false); arrow.SetActive(false); DebugDraw3D.DrawCone(val, val2, 0.005f, Color.blue, 0f, ""); DebugDraw3D.DrawCone(val3, val2, 0.005f, Color.blue, 0f, ""); return; } if (clipabs <= 0) { arrowshouldfire = false; arrow.gameObject.SetActive(false); } if (clipabs > 0) { arrow.gameObject.SetActive(true); } if (chargearrowrunning) { DebugDraw3D.DrawCone(val, ((Component)weapon).transform.position - ((Component)weapon).transform.forward * 0.5f + ((Component)weapon).transform.up * 0.03f, 0.005f, Color.blue, 0f, ""); DebugDraw3D.DrawCone(val3, ((Component)weapon).transform.position - ((Component)weapon).transform.forward * 0.5f + ((Component)weapon).transform.up * 0.03f, 0.005f, Color.blue, 0f, ""); } if (!chargearrowrunning) { DebugDraw3D.DrawCone(val, val2, 0.005f, Color.blue, 0f, ""); DebugDraw3D.DrawCone(val3, val2, 0.005f, Color.blue, 0f, ""); } } public void StartReload() { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimReload()), (Action)null); } public void StartAim() { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimAim()), (Action)null); } public void StartChargeArrow() { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimChargeArrow()), (Action)null); } public void StartIdle() { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimIdle()), (Action)null); } public IEnumerator AnimIdle() { aimrunning = false; reloadrunning = false; chargearrowrunning = false; ((Component)weapon).transform.localPosition = new Vector3(0.06f, -0.2f, 0.63f); ((Component)weapon).transform.localEulerAngles = new Vector3(13f, 347f, 300f); arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.81f); righthand.localPosition = new Vector3(0.04f, 0.1f, -0.23f); yield return null; } public IEnumerator AnimAim() { aimrunning = true; arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.81f); animname = "Aim"; nextanim = ""; animneedsbreak = false; float progress = 0f; _ = ((Item)weapon).LeftHandGripTrans.localPosition; _ = ((Item)weapon).LeftHandGripTrans.localEulerAngles; Vector3 maorigpos = ((Component)weapon).transform.localPosition; Vector3 maorigeul = ((Component)weapon).transform.localEulerAngles; _ = ((Item)weapon).RightHandGripTrans.localPosition; _ = ((Item)weapon).RightHandGripTrans.localEulerAngles; float starttime = Time.time; bool animdone = false; prevstate = (eMeleeWeaponState)1; while (aimrunning) { if (progress < 1f) { progress = (Time.time - starttime) * 4f; } if (!animdone && progress >= 1f) { animdone = true; progress = 0.99999f; } if (progress < 1f && !animdone) { ((Component)weapon).transform.localPosition = Vector3.Lerp(maorigpos, new Vector3(0.06f, 0f, 0.63f), progress); ((Component)weapon).transform.localEulerAngles = Vector3.Lerp(maorigeul, new Vector3(-7f, 355f, 335f), progress); } yield return null; } yield return null; } public IEnumerator AnimShove() { animrunning = true; animname = "Shove"; prevstate = (eMeleeWeaponState)13; shoveTime = Time.time; ((Component)meleealign).transform.localPosition = new Vector3(0.14f, 0.3f, -0.1f); ((Component)meleealign).transform.localEulerAngles = new Vector3(335f, 340f, 216f); ((Item)weapon).LeftHandGripTrans.localPosition = new Vector3(0.11f, 0.3f, -0.19f); ((Item)weapon).LeftHandGripTrans.localEulerAngles = new Vector3(42f, 92f, 333f); ((Item)weapon).RightHandGripTrans.localPosition = new Vector3(0.17f, 0.13f, -0.15f); ((Item)weapon).RightHandGripTrans.localEulerAngles = new Vector3(36f, 64f, 327f); yield return (object)new WaitForSeconds(0.25f); StartIdle(); nextanim = "Idle"; animneedsbreak = false; animrunning = false; yield return null; } private IEnumerator AnimChargeMelee() { animname = "ChargeMelee"; nextanim = ""; animrunning = true; animneedsbreak = false; yield return null; } public IEnumerator AnimChargeArrow() { chargearrowrunning = true; animname = "ChargeArrow"; nextanim = ""; animrunning = true; animneedsbreak = false; float progress = 0f; Vector3 origpos = ((Item)weapon).RightHandGripTrans.localPosition; _ = ((Item)weapon).RightHandGripTrans.localEulerAngles; Vector3 arroworigpos = ((Item)weapon).RightHandGripTrans.localPosition; float starttime = Time.time; bool animdone = false; while (!animdone) { prevstate = (eMeleeWeaponState)1; if (progress < 1f) { progress = (Time.time - starttime) * 4f; } if (!animdone && progress >= 1f) { animdone = true; progress = 0.99999f; } if (progress < 1f) { ((Item)weapon).RightHandGripTrans.localPosition = Vector3.Lerp(origpos, new Vector3(0.04f, 0.1f, -0.63f), progress); arrow.transform.localPosition = Vector3.Lerp(arroworigpos, new Vector3(-0.03f, 0.03f, -0.39f), progress); } yield return null; } yield return null; } public IEnumerator AnimReload() { if (reloadrunning) { yield break; } chargearrowrunning = false; if (inbackabs < 1) { arrowshouldfire = false; StartIdle(); yield break; } reloadrunning = true; float progress = 0f; Vector3 origpos = ((Item)weapon).RightHandGripTrans.localPosition; Vector3 origeul = ((Item)weapon).RightHandGripTrans.localEulerAngles; float starttime = Time.time; bool animdone = false; ((Component)((Item)weapon).RightHandGripTrans).transform.localEulerAngles = new Vector3(180f, 0f, 0f); while (!animdone) { if (progress < 1f) { progress = (Time.time - starttime) * 2f; } if (!animdone && progress >= 1f) { animdone = true; progress = 0.99999f; } if (progress < 1f) { ((Component)((Item)weapon).RightHandGripTrans).transform.localPosition = Vector3.Lerp(origpos, new Vector3(-0.16f, 0.2f, -0.73f), progress); } yield return null; } try { handarrow.SetActive(true); } catch (Exception) { } animdone = false; progress = 0f; starttime = Time.time; Vector3 newpos = ((Item)weapon).RightHandGripTrans.localPosition; _ = ((Item)weapon).RightHandGripTrans.localEulerAngles; ((Item)weapon).RightHandGripTrans.localEulerAngles = origeul; while (!animdone) { if (progress < 1f) { progress = (Time.time - starttime) * 2f; } if (!animdone && progress >= 1f) { animdone = true; progress = 0.99999f; } if (progress < 1f) { ((Item)weapon).RightHandGripTrans.localPosition = Vector3.Lerp(newpos, origpos, progress); } yield return null; } try { handarrow.SetActive(false); } catch (Exception) { } arrow.SetActive(true); arrowloaded = true; if (inbackabs > 0) { inbackabs--; } clipabs = 1; inbackrel = (float)inbackabs / (float)inbackmax; reloadrunning = false; yield return null; } } [HarmonyPatch] internal class BowPatches : MonoBehaviour { private static float lastupdate; [HarmonyPatch(typeof(MeleeWeaponFirstPerson), "OnWield")] [HarmonyPrefix] private static bool PrefixOnWield(MeleeWeaponFirstPerson __instance) { if (((GameDataBlockBase)(object)((Item)__instance).ItemDataBlock).name == "GEAR_RecurveBow") { ((Item)__instance).Owner.AnimatorArms.Play("Spear_Idle", 7, 0f); BowHandlerFP component = ((Component)__instance).GetComponent(); if (!component.started) { component.BeginGame(); } } return true; } [HarmonyPatch(typeof(MeleeWeaponThirdPerson), "OnWield")] [HarmonyPrefix] private static bool PrefixTPOnWield(MeleeWeaponThirdPerson __instance) { if (((GameDataBlockBase)(object)((Item)__instance).ItemDataBlock).name == "GEAR_RecurveBow") { ((Behaviour)__instance).enabled = true; ((Item)__instance).Owner.AnimatorArms.Play("Spear_Idle", 7, 0f); BowHandlerTP component = ((Component)__instance).GetComponent(); if (!component.started) { component.BeginGame(); } component.OnWield(); } return true; } [HarmonyPatch(typeof(MeleeWeaponThirdPerson), "Update")] [HarmonyPrefix] private static bool PrefixTPUpdate(MeleeWeaponThirdPerson __instance) { if (((GameDataBlockBase)(object)((Item)__instance).ItemDataBlock).name == "GEAR_RecurveBow") { if (Time.time - lastupdate > 1f) { BowHandlerTP component = ((Component)__instance).GetComponent(); if (!component.aimrunning && !component.reloadrunning && !component.chargearrowrunning) { component.OnWield(); } lastupdate = Time.time; } return false; } return true; } [HarmonyPatch(typeof(MWS_Push), "Enter")] [HarmonyPrefix] private static bool PrefixPushEnter(MWS_Push __instance) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown if (((GameDataBlockBase)(object)((Item)((MWS_Base)__instance).m_weapon).ItemDataBlock).name != "GEAR_RecurveBow") { return true; } if ((Object)(object)((Item)((MWS_Base)__instance).m_weapon).Owner != (Object)(object)PlayerManager.GetLocalPlayerAgent()) { return false; } if (InputMapper.GetButtonKeyMouseGamepad((InputAction)7, (eFocusState)0)) { if (InputMapper.GetButtonKeyMouseGamepad((InputAction)12, (eFocusState)0)) { return true; } return false; } List list = new List(); Collider[] array = Il2CppArrayBase.op_Implicit((Il2CppArrayBase)(object)Physics.OverlapSphere(((Agent)((Item)((MWS_Base)__instance).m_weapon).Owner).Position + ((Component)((Item)((MWS_Base)__instance).m_weapon).Owner).transform.forward * 0.5f, 0.5f, LayerManager.MASK_MELEE_ATTACK_TARGETS)); foreach (Collider val in array) { if ((Object)(object)((Component)val).GetComponentInParent() != (Object)null) { list.Add(((Component)val).GetComponentInParent()); } } if (list.Count > 0) { ((MWS_Base)__instance).m_weapon.DoAttackDamage(new MeleeWeaponDamageData { damageGO = ((Component)((Agent)((Component)list[0]).GetComponentInParent()).AimTarget).gameObject, sourcePos = ((Agent)((Item)((MWS_Base)__instance).m_weapon).Owner).Position }, true); } return true; } [HarmonyPatch(typeof(MWS_AttackLight), "Enter")] [HarmonyPrefix] private static bool PrefixAttackLightEnter(MWS_AttackLight __instance) { if (((GameDataBlockBase)(object)((Item)((MWS_Base)__instance).m_weapon).ItemDataBlock).name != "GEAR_RecurveBow") { return true; } if ((Object)(object)((Item)((MWS_Base)__instance).m_weapon).Owner == (Object)(object)PlayerManager.GetLocalPlayerAgent()) { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(((Component)((MWS_Base)__instance).m_weapon).GetComponent().AnimShove()), (Action)null); } if ((Object)(object)((Item)((MWS_Base)__instance).m_weapon).Owner != (Object)(object)PlayerManager.GetLocalPlayerAgent()) { CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(((Component)((MWS_Base)__instance).m_weapon).GetComponent().AnimShove()), (Action)null); } return true; } [HarmonyPatch(typeof(MWS_AttackHeavy), "Enter")] [HarmonyPrefix] private static bool PrefixAttackHeavy(MWS_AttackHeavy __instance) { //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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) if (((GameDataBlockBase)(object)((Item)((MWS_Base)__instance).m_weapon).ItemDataBlock).name != "GEAR_RecurveBow") { return true; } if ((Object)(object)((Item)((MWS_Base)__instance).m_weapon).Owner != (Object)(object)PlayerManager.GetLocalPlayerAgent()) { return false; } if (!InputMapper.GetButtonKeyMouseGamepad((InputAction)7, (eFocusState)0)) { return true; } BowHandlerFP component = ((Component)((MWS_Base)__instance).m_weapon).GetComponent(); if (!component.arrowshouldfire) { return true; } pPlayerData_Session session = SNet.LocalPlayer.Session; NetworkAPI.InvokeEvent("BowNetInfo", new Plugin.BowNetInfo(5, ((pPlayerData_Session)(ref session)).playerSlotIndex, component.inbackabs), (SNet_ChannelType)2); component.clipabs = 0; component.inbackrel = (float)component.inbackabs / (float)component.inbackmax; GuiManager.PlayerLayer.Inventory.SetSlotAmmo((InventorySlot)10, 0, component.inbackabs, component.inbackrel); RaycastHit val = default(RaycastHit); Physics.Raycast(Camera.current.ScreenPointToRay(Input.mousePosition), ref val, 200f, LayerManager.MASK_PING_TARGET, (QueryTriggerInteraction)1); float speed = Mathf.Min(((MWS_AttackSwingBase)__instance).m_elapsed / ((ItemEquippable)((MWS_Base)__instance).m_weapon).MeleeAnimationData.MaxDamageChargeTime, 1f); ArrowHandler arrowHandler = new GameObject("Arrow").AddComponent(); arrowHandler.position = component.arrow.transform.position; Vector3 val2 = ((RaycastHit)(ref val)).point - arrowHandler.position; arrowHandler.direction = ((Vector3)(ref val2)).normalized; arrowHandler.weapon = ((MWS_Base)__instance).m_weapon; arrowHandler.speed = speed; arrowHandler.target = ((RaycastHit)(ref val)).point; arrowHandler.Shoot(); component.arrow.gameObject.SetActive(false); return false; } } [BepInPlugin("RecurveBow", "RecurveBow", "0.1.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BasePlugin { public struct ArrowNetInfo { public int ARROWINDEX; public int SLOT; public Vector3 POSITION; public Vector3 DIRECTION; public float SPEED; public int STATUS; public uint ENEMYAGENT; public static string NetworkIdentity => "ArrowNetInfo"; public ArrowNetInfo(int arrowindex, int slot, Vector3 position, Vector3 direction, float speed, int status, uint enemyagent) { //IL_0016: 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) this = default(ArrowNetInfo); ARROWINDEX = arrowindex; SLOT = slot; POSITION = position; DIRECTION = direction; SPEED = speed; STATUS = status; ENEMYAGENT = enemyagent; } } public struct ArrowInfo { public int ARROWINDEX; public int SLOT; public Vector3 POSITION; public Vector3 DIRECTION; public float SPEED; public int STATUS; public uint ENEMYAGENT; public ArrowInfo(int arrowindex, int slot, Vector3 position, Vector3 direction, float speed, int status, uint enemyagent) { //IL_0016: 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) this = default(ArrowInfo); ARROWINDEX = arrowindex; SLOT = slot; POSITION = position; DIRECTION = direction; SPEED = speed; STATUS = status; ENEMYAGENT = enemyagent; } public ArrowInfo(ArrowNetInfo network) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) this = default(ArrowInfo); ARROWINDEX = network.ARROWINDEX; SLOT = network.SLOT; POSITION = network.POSITION; DIRECTION = network.DIRECTION; SPEED = network.SPEED; STATUS = network.STATUS; ENEMYAGENT = network.ENEMYAGENT; } } public struct BowNetInfo { public int FUNC; public int SLOT; public int AMMOCOUNT; public static string NetworkIdentity => "BowNetInfo"; public BowNetInfo(int func, int slot, int ammocount) { this = default(BowNetInfo); FUNC = func; SLOT = slot; AMMOCOUNT = ammocount; } } public struct BowInfo { public int FUNC; public int SLOT; public int AMMOCOUNT; public BowInfo(int func, int slot, int ammocount) { this = default(BowInfo); FUNC = func; SLOT = slot; AMMOCOUNT = ammocount; } public BowInfo(BowNetInfo network) { this = default(BowInfo); FUNC = network.FUNC; SLOT = network.SLOT; AMMOCOUNT = network.AMMOCOUNT; } } public class RecurveBow : MonoBehaviour { public unsafe static void ReceiveArrowNetInfo(ulong sender, ArrowNetInfo netInfo) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: 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_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_0756: Unknown result type (might be due to invalid IL or missing references) //IL_0603: 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_05c5: Unknown result type (might be due to invalid IL or missing references) EnemyAgent val = null; string[] obj = new string[16] { "RecurveBow - ArrowNet - received data from sender ", sender.ToString(), ": arrowindex:", netInfo.ARROWINDEX.ToString(), " slot:", netInfo.SLOT.ToString(), " position:", null, null, null, null, null, null, null, null, null }; Vector3 pOSITION = netInfo.POSITION; obj[7] = ((object)(*(Vector3*)(&pOSITION))/*cast due to .constrained prefix*/).ToString(); obj[8] = " direction:"; pOSITION = netInfo.DIRECTION; obj[9] = ((object)(*(Vector3*)(&pOSITION))/*cast due to .constrained prefix*/).ToString(); obj[10] = " speed:"; obj[11] = netInfo.SPEED.ToString(); obj[12] = " status:"; obj[13] = netInfo.STATUS.ToString(); obj[14] = " enemyagent:"; obj[15] = netInfo.ENEMYAGENT.ToString(); Debug.Log(Object.op_Implicit(string.Concat(obj))); int num = 20; for (int i = 0; i < PlayerManager.PlayerAgentsInLevel.Count; i++) { PlayerAgent val2 = PlayerManager.PlayerAgentsInLevel[i]; if (sender == ((Agent)val2).m_replicator.OwningPlayer.Lookup) { num = i; } } if (num == 20) { return; } PlayerAgent val3 = PlayerManager.PlayerAgentsInLevel[num]; if (netInfo.ENEMYAGENT != 0) { pReplicator pRep = default(pReplicator); pRep.keyPlusOne = (ushort)netInfo.ENEMYAGENT; pAgent val4 = default(pAgent); val4.pRep = pRep; Agent val5 = default(Agent); ((pAgent)(ref val4)).TryGet(ref val5); val = ((Il2CppObjectBase)val5).TryCast(); } if (netInfo.STATUS == 0) { GameObject val6 = new GameObject($"Arrow_{val3.PlayerName}_{netInfo.ARROWINDEX}"); val6.transform.position = netInfo.POSITION; val6.transform.eulerAngles = netInfo.DIRECTION; ArrowHandler arrowHandler = val6.AddComponent(); arrowHandler.position = netInfo.POSITION; arrowHandler.direction = netInfo.DIRECTION; arrowHandler.weapontp = ((Component)val3).gameObject.GetComponentInChildren(); arrowHandler.speed = netInfo.SPEED; arrowHandler.arrowindex = netInfo.ARROWINDEX; arrowHandler.Shoot(); arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX] = arrowHandler; } if (netInfo.STATUS == 2 && (Object)(object)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX] != (Object)null) { arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].audio.Post(3762526143u, true); arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].speed = 0f; arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].status = 2; arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].velocity = Vector3.zero; ((Component)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX]).transform.position = netInfo.POSITION; } if (netInfo.STATUS == 3 && (Object)(object)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX] != (Object)null) { Object.Destroy((Object)(object)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow); arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow = Object.Instantiate(ArrowHandler.Build(isprop: true)); arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].tmpvalo = arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow.AddComponent(); arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].tmpvalo.range = 1f; arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].tmpvalo.intensity = 0.6f; ((Renderer)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow.GetComponent()).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.grayTexture); ((Object)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow).name = "Arrow_Prop"; ((Component)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX]).transform.position = netInfo.POSITION; arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow.transform.parent = ((Component)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX]).transform; if ((Object)(object)val != (Object)null) { arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].hitagent = (Agent)(object)val; } if ((Object)(object)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].hitagent != (Object)null) { ((Component)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX]).transform.position = arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].hitagent.Position; } arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow.transform.localPosition = new Vector3(0f, 0f, 0f); arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow.transform.localScale = new Vector3(0.05f, 2f, 0.05f); arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].proparrowbuilt = true; arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].status = 3; } if (netInfo.STATUS == 4 && (Object)(object)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX] != (Object)null) { arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].hitagent = (Agent)(object)val; arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].enemyhit = true; arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow.transform.parent = ((Agent)val).AimTarget; arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow.transform.localPosition = Vector3.zero; arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].status = 4; } if (netInfo.STATUS == 5 && (Object)(object)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX] != (Object)null) { Object.Destroy((Object)(object)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrowtip); Object.Destroy((Object)(object)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX].arrow); Object.Destroy((Object)(object)((Component)arrowinfo[netInfo.SLOT][netInfo.ARROWINDEX]).gameObject); } } public static void ReceiveBowNetInfo(ulong sender, BowNetInfo netInfo) { Debug.Log(Object.op_Implicit("RecurveBow - BowNet - received data from sender " + sender + ": func:" + netInfo.FUNC + " slot:" + netInfo.SLOT + " ammocount:" + netInfo.AMMOCOUNT)); int num = 20; for (int i = 0; i < PlayerManager.PlayerAgentsInLevel.Count; i++) { PlayerAgent val = PlayerManager.PlayerAgentsInLevel[i]; if (sender == ((Agent)val).m_replicator.OwningPlayer.Lookup) { num = i; } } if (num != 20) { BowHandlerTP componentInChildren = ((Component)PlayerManager.PlayerAgentsInLevel[num]).gameObject.GetComponentInChildren(); ((ItemEquippable)componentInChildren.weapon).StopAnimationSequenceCoroutine(); ((Behaviour)((Component)componentInChildren.weapon).GetComponentInChildren()).enabled = false; componentInChildren.inbackabs = netInfo.AMMOCOUNT; if (netInfo.FUNC == 0) { componentInChildren.reloadrunning = false; componentInChildren.aimrunning = false; componentInChildren.chargearrowrunning = false; componentInChildren.shoverunning = false; componentInChildren.StartIdle(); } if (netInfo.FUNC == 1) { componentInChildren.StartReload(); } if (netInfo.FUNC == 2) { componentInChildren.StartAim(); } if (netInfo.FUNC == 4) { componentInChildren.StartChargeArrow(); } if (netInfo.FUNC == 5) { componentInChildren.StartReload(); } if (netInfo.FUNC == 6) { componentInChildren.clipabs = 0; } } } public void Initialize() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0064: 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) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Expected O, but got Unknown //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Expected O, but got Unknown //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_02b9: Expected O, but got Unknown //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Expected O, but got Unknown //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Expected O, but got Unknown //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Expected O, but got Unknown //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Expected O, but got Unknown //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Expected O, but got Unknown //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Expected O, but got Unknown //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: 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_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Expected O, but got Unknown //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: 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_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0459: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Expected O, but got Unknown //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_049b: 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_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Expected O, but got Unknown //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Expected O, but got Unknown //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Expected O, but got Unknown //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_057e: Unknown result type (might be due to invalid IL or missing references) //IL_0589: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05cd: Unknown result type (might be due to invalid IL or missing references) //IL_05dd: Expected O, but got Unknown //IL_05dd: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_0614: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Expected O, but got Unknown //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_0640: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_0661: 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_0677: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Expected O, but got Unknown //IL_0694: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Unknown result type (might be due to invalid IL or missing references) //IL_06c0: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Expected O, but got Unknown //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_06ec: Unknown result type (might be due to invalid IL or missing references) //IL_06f3: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Expected O, but got Unknown //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_0719: Expected O, but got Unknown //IL_071a: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0726: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_073c: Expected O, but got Unknown //IL_073c: Unknown result type (might be due to invalid IL or missing references) //IL_074c: Expected O, but got Unknown //IL_074d: Unknown result type (might be due to invalid IL or missing references) //IL_0752: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Unknown result type (might be due to invalid IL or missing references) //IL_0768: Unknown result type (might be due to invalid IL or missing references) //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_077e: Unknown result type (might be due to invalid IL or missing references) //IL_0789: Unknown result type (might be due to invalid IL or missing references) //IL_0794: Unknown result type (might be due to invalid IL or missing references) //IL_079b: Unknown result type (might be due to invalid IL or missing references) //IL_079c: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07b1: Expected O, but got Unknown //IL_07b1: Unknown result type (might be due to invalid IL or missing references) //IL_07bc: Unknown result type (might be due to invalid IL or missing references) //IL_07c7: Unknown result type (might be due to invalid IL or missing references) //IL_07d2: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Expected O, but got Unknown //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_07f3: Unknown result type (might be due to invalid IL or missing references) //IL_07fe: Unknown result type (might be due to invalid IL or missing references) //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_0814: Unknown result type (might be due to invalid IL or missing references) //IL_081f: Unknown result type (might be due to invalid IL or missing references) //IL_082a: Unknown result type (might be due to invalid IL or missing references) //IL_0835: Unknown result type (might be due to invalid IL or missing references) //IL_083c: Unknown result type (might be due to invalid IL or missing references) //IL_083d: Unknown result type (might be due to invalid IL or missing references) //IL_0842: Unknown result type (might be due to invalid IL or missing references) //IL_0852: Expected O, but got Unknown //IL_0852: Unknown result type (might be due to invalid IL or missing references) //IL_085d: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_087e: Unknown result type (might be due to invalid IL or missing references) //IL_088e: Expected O, but got Unknown //IL_088f: Unknown result type (might be due to invalid IL or missing references) //IL_0894: Unknown result type (might be due to invalid IL or missing references) //IL_089f: Unknown result type (might be due to invalid IL or missing references) //IL_08aa: Unknown result type (might be due to invalid IL or missing references) //IL_08b5: Unknown result type (might be due to invalid IL or missing references) //IL_08c0: Unknown result type (might be due to invalid IL or missing references) //IL_08cb: Unknown result type (might be due to invalid IL or missing references) //IL_08d6: Unknown result type (might be due to invalid IL or missing references) //IL_08dd: Unknown result type (might be due to invalid IL or missing references) //IL_08de: Unknown result type (might be due to invalid IL or missing references) //IL_08e3: Unknown result type (might be due to invalid IL or missing references) //IL_08f3: Expected O, but got Unknown //IL_08f3: Unknown result type (might be due to invalid IL or missing references) //IL_08fe: Unknown result type (might be due to invalid IL or missing references) //IL_0909: Unknown result type (might be due to invalid IL or missing references) //IL_0914: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_093a: Expected O, but got Unknown //IL_093b: Unknown result type (might be due to invalid IL or missing references) //IL_0940: Unknown result type (might be due to invalid IL or missing references) //IL_094b: Unknown result type (might be due to invalid IL or missing references) //IL_0956: Unknown result type (might be due to invalid IL or missing references) //IL_0961: Unknown result type (might be due to invalid IL or missing references) //IL_096c: Unknown result type (might be due to invalid IL or missing references) //IL_0977: Unknown result type (might be due to invalid IL or missing references) //IL_0982: Unknown result type (might be due to invalid IL or missing references) //IL_0989: Unknown result type (might be due to invalid IL or missing references) //IL_098a: Unknown result type (might be due to invalid IL or missing references) //IL_098f: Unknown result type (might be due to invalid IL or missing references) //IL_099f: Expected O, but got Unknown //IL_099f: Unknown result type (might be due to invalid IL or missing references) //IL_09aa: Unknown result type (might be due to invalid IL or missing references) //IL_09b5: Unknown result type (might be due to invalid IL or missing references) //IL_09c0: Unknown result type (might be due to invalid IL or missing references) //IL_09cb: Unknown result type (might be due to invalid IL or missing references) //IL_09d6: Unknown result type (might be due to invalid IL or missing references) //IL_09e6: Expected O, but got Unknown //IL_09e7: Unknown result type (might be due to invalid IL or missing references) //IL_09ec: Unknown result type (might be due to invalid IL or missing references) //IL_09fc: Expected O, but got Unknown //IL_09fd: Unknown result type (might be due to invalid IL or missing references) //IL_0a02: Unknown result type (might be due to invalid IL or missing references) //IL_0a12: Expected O, but got Unknown //IL_0a13: Unknown result type (might be due to invalid IL or missing references) //IL_0a18: Unknown result type (might be due to invalid IL or missing references) //IL_0a28: Expected O, but got Unknown //IL_0a29: Unknown result type (might be due to invalid IL or missing references) //IL_0a2e: Unknown result type (might be due to invalid IL or missing references) //IL_0a3e: Expected O, but got Unknown //IL_0a3f: Unknown result type (might be due to invalid IL or missing references) //IL_0a44: Unknown result type (might be due to invalid IL or missing references) //IL_0a54: Expected O, but got Unknown //IL_0a55: Unknown result type (might be due to invalid IL or missing references) //IL_0a5a: Unknown result type (might be due to invalid IL or missing references) //IL_0a6a: Expected O, but got Unknown //IL_0a6b: Unknown result type (might be due to invalid IL or missing references) //IL_0a70: Unknown result type (might be due to invalid IL or missing references) //IL_0a80: Expected O, but got Unknown //IL_0a81: Unknown result type (might be due to invalid IL or missing references) //IL_0a86: Unknown result type (might be due to invalid IL or missing references) //IL_0a96: Expected O, but got Unknown //IL_0b9e: Unknown result type (might be due to invalid IL or missing references) //IL_0bcc: Unknown result type (might be due to invalid IL or missing references) //IL_0bd6: Unknown result type (might be due to invalid IL or missing references) //IL_0c04: Unknown result type (might be due to invalid IL or missing references) //IL_0c0e: Unknown result type (might be due to invalid IL or missing references) //IL_0c3c: Unknown result type (might be due to invalid IL or missing references) //IL_0c5a: Unknown result type (might be due to invalid IL or missing references) //IL_0c60: Expected O, but got Unknown //IL_0cc1: Unknown result type (might be due to invalid IL or missing references) //IL_0ce1: Unknown result type (might be due to invalid IL or missing references) //IL_0d14: Unknown result type (might be due to invalid IL or missing references) //IL_0d34: Unknown result type (might be due to invalid IL or missing references) //IL_0d67: Unknown result type (might be due to invalid IL or missing references) //IL_0ea5: Unknown result type (might be due to invalid IL or missing references) //IL_0eac: Expected O, but got Unknown //IL_0ede: Unknown result type (might be due to invalid IL or missing references) //IL_0efe: Unknown result type (might be due to invalid IL or missing references) //IL_0f31: Unknown result type (might be due to invalid IL or missing references) //IL_0f51: Unknown result type (might be due to invalid IL or missing references) //IL_1017: Unknown result type (might be due to invalid IL or missing references) //IL_1031: Unknown result type (might be due to invalid IL or missing references) //IL_104b: Unknown result type (might be due to invalid IL or missing references) //IL_1065: Unknown result type (might be due to invalid IL or missing references) //IL_108e: Unknown result type (might be due to invalid IL or missing references) //IL_1093: Unknown result type (might be due to invalid IL or missing references) //IL_109a: Unknown result type (might be due to invalid IL or missing references) //IL_10a5: Unknown result type (might be due to invalid IL or missing references) //IL_10b0: Unknown result type (might be due to invalid IL or missing references) //IL_10c0: Expected O, but got Unknown //IL_111a: Unknown result type (might be due to invalid IL or missing references) //IL_111f: Unknown result type (might be due to invalid IL or missing references) //IL_112f: Expected O, but got Unknown //IL_1130: Unknown result type (might be due to invalid IL or missing references) //IL_1135: Unknown result type (might be due to invalid IL or missing references) //IL_1145: Expected O, but got Unknown //IL_12b9: Unknown result type (might be due to invalid IL or missing references) //IL_12be: Unknown result type (might be due to invalid IL or missing references) //IL_12ce: Expected O, but got Unknown //IL_12cf: Unknown result type (might be due to invalid IL or missing references) //IL_12d4: Unknown result type (might be due to invalid IL or missing references) //IL_12e4: Expected O, but got Unknown //IL_13c6: Unknown result type (might be due to invalid IL or missing references) //IL_13cb: Unknown result type (might be due to invalid IL or missing references) //IL_13d2: Unknown result type (might be due to invalid IL or missing references) //IL_13dd: Expected O, but got Unknown //IL_13dd: Unknown result type (might be due to invalid IL or missing references) //IL_13eb: Expected O, but got Unknown AssetShardManager.LoadShard(AssetShardManager.GetShardName((AssetBundleName)140, (AssetBundleShard)10), (LoadSceneMode)1); Debug.Log(Object.op_Implicit("RecurceBow - building weapon..")); gearpart = new GameObject("Handle_Bow_1"); ((Object)gearpart).hideFlags = (HideFlags)61; gearpart.layer = LayerManager.LAYER_FIRST_PERSON_ITEM; gearpart.transform.position = new Vector3(0f, 1000f, 0f); GameObject obj = Object.Instantiate(BowCreator.Build()); Object.Destroy((Object)(object)obj.GetComponent()); obj.layer = LayerManager.LAYER_FIRST_PERSON_ITEM; ((Object)obj).name = "Handle_Bow_1"; obj.transform.SetParent(gearpart.transform); obj.transform.localScale = new Vector3(0.6f, 1.5f, 0.3f); ((Object)obj).hideFlags = (HideFlags)61; AssetAPI.RegisterAsset("Assets/Hirnu/BowHandle.prefab", (Object)(object)gearpart); GearMeleeHandlePartDataBlock obj2 = GameDataBlockBase.AddNewBlock(); ((GameDataBlockBase)(object)obj2).name = "recurve_bow_handle"; obj2.General.Model = "Assets/Hirnu/BowHandle.prefab"; obj2.General.GearCategoryFilter = 0u; obj2.General.AssetBundle = (AssetBundleName)160; obj2.General.BundleShard = (AssetBundleShard)9; gearpid = ((GameDataBlockBase)(object)obj2).persistentID; List obj3 = new List { "Bow_Idle", "Bow_settle", "Bow_Walk", "Bow_chargeup_cancel", "Bow_chargeup2_cancel", "Bow_Hit", "Bow_Hit2", "Bow_Push", "Bow_Chargeup", "Bow_Chargeup2", "Bow_ChargeupRelease", "Bow_ChargeupRelease2", "Bow_Idle_crouch", "Bow_SwingLeft", "Bow_SwingLeft_crouch", "Bow_Charge_Left_Start", "Bow_Charge_Left_Start_Crouch", "Bow_Charge_Left_Release", "Bow_Charge_Left_Release_Crouch" }; List list = new List(); foreach (string item in obj3) { AnimationClip val = new AnimationClip(); ((Object)val).name = item; AnimationEvent val2 = new AnimationEvent(); val2.functionName = "Bow_Anim"; val.AddEvent(val2); list.Add(val); } MeleeAnimationSetDataBlock val3 = GameDataBlockBase.AddNewBlock(); val3.HoldToChargeTime = 0.2f; val3.MaxDamageChargeTime = 0.6f; val3.AutoAttackTime = 15f; val3.AutoAttackWarningTime = 14.5f; val3.FPIdleAnim = new AnimHash { Name = "Bow_Idle" }; val3.FPSettleAnim = new AnimHash { Name = "Bow_Settle" }; val3.FPWalkAnim = new AnimHash { Name = "Bow_Walk" }; val3.FPRunAnim = new AnimHash { Name = "" }; val3.FPJumpAnim = new AnimHash { Name = "sledgehammer_jump" }; val3.FPLandAnim = new AnimHash { Name = "sledgehammer_land" }; val3.FPChargeCancelAnimRight = new AnimHash { Name = "bow_chargeup_cancel" }; val3.FPChargeCancelAnimLeft = new AnimHash { Name = "bow_chargeup2_cancel" }; val3.FPAttackMissRight = new MeleeAttackData { AttackLengthTime = 1f, AttackHitTime = 1f / 6f, DamageStartTime = 0.1f, DamageEndTime = 4f / 15f, AttackCamFwdHitTime = 1f / 6f, ComboEarlyTime = 0.5f, Side = (eMeleeAttackSide)1, Anim = new AnimHash { Name = "Bow_Hit" }, AnimBlendIn = 0f, AttackLengthFrameTime = 30f, AttackHitFrameTime = 5f, DamageStartFrameTime = 3f, DamageEndFrameTime = 8f, AttackCamFwdHitFrameTime = 5f, ComboEarlyFrameTime = 15f }; val3.FPAttackMissLeft = new MeleeAttackData { AttackLengthTime = 1f, AttackHitTime = 1f / 6f, DamageStartTime = 0.1f, DamageEndTime = 4f / 15f, AttackCamFwdHitTime = 1f / 6f, ComboEarlyTime = 0.5f, Side = (eMeleeAttackSide)2, Anim = new AnimHash { Name = "Bow_Hit" }, AnimBlendIn = 0f, AttackLengthFrameTime = 30f, AttackHitFrameTime = 5f, DamageStartFrameTime = 3f, DamageEndFrameTime = 8f, AttackCamFwdHitFrameTime = 5f, ComboEarlyFrameTime = 15f }; val3.FPAttackHitRight = new MeleeAttackData { AttackLengthTime = 1f, AttackHitTime = 1f / 6f, DamageStartTime = 0f, DamageEndTime = 0f, AttackCamFwdHitTime = 0f, ComboEarlyTime = 0.3f, Side = (eMeleeAttackSide)1, Anim = new AnimHash { Name = "Bow_Hit" }, AnimBlendIn = 0f, AttackLengthFrameTime = 30f, AttackHitFrameTime = 5f, DamageStartFrameTime = 0f, DamageEndFrameTime = 0f, AttackCamFwdHitFrameTime = 0f, ComboEarlyFrameTime = 9f }; val3.FPAttackHitLeft = new MeleeAttackData { AttackLengthTime = 1f, AttackHitTime = 1f / 6f, DamageStartTime = 0f, DamageEndTime = 0f, AttackCamFwdHitTime = 0f, ComboEarlyTime = 0.3f, Side = (eMeleeAttackSide)2, Anim = new AnimHash { Name = "Bow_Hit" }, AnimBlendIn = 0f, AttackLengthFrameTime = 30f, AttackHitFrameTime = 5f, DamageStartFrameTime = 0f, DamageEndFrameTime = 0f, AttackCamFwdHitFrameTime = 0f, ComboEarlyFrameTime = 9f }; val3.FPAttackPush = new MeleeAttackData { AttackLengthTime = 5f / 6f, AttackHitTime = 1f / 6f, DamageStartTime = 2f / 15f, DamageEndTime = 1f / 3f, AttackCamFwdHitTime = 1f / 6f, ComboEarlyTime = 0.5f, Side = (eMeleeAttackSide)3, Anim = new AnimHash { Name = "Bow_Push" }, AnimBlendIn = 0f, AttackLengthFrameTime = 0f, AttackHitFrameTime = 0f, DamageStartFrameTime = 4f, DamageEndFrameTime = 10f, AttackCamFwdHitFrameTime = 5f, ComboEarlyFrameTime = 15f }; val3.FPAttackChargeUpRight = new MeleeAttackData { Side = (eMeleeAttackSide)1, Anim = new AnimHash { Name = "Bow_Chargeup" }, AnimBlendIn = 0.05f }; val3.FPAttackChargeUpLeft = new MeleeAttackData { Side = (eMeleeAttackSide)2, Anim = new AnimHash { Name = "Bow_Chargeup" }, AnimBlendIn = 0.05f }; val3.FPAttackChargeUpReleaseRight = new MeleeAttackData { AttackLengthTime = 1f, AttackHitTime = 1f / 6f, DamageStartTime = 0f, DamageEndTime = 11f / 30f, AttackCamFwdHitTime = 1f / 6f, ComboEarlyTime = 0.3f, Side = (eMeleeAttackSide)1, Anim = new AnimHash { Name = "Bow_ChargeupRelease" }, AttackLengthFrameTime = 30f, AttackHitFrameTime = 5f, DamageEndFrameTime = 11f, AttackCamFwdHitFrameTime = 5f, ComboEarlyFrameTime = 9f }; val3.FPAttackChargeUpReleaseLeft = new MeleeAttackData { AttackLengthTime = 1f, AttackHitTime = 1f / 6f, DamageStartTime = 0f, DamageEndTime = 11f / 30f, AttackCamFwdHitTime = 1f / 6f, ComboEarlyTime = 0.3f, Side = (eMeleeAttackSide)2, Anim = new AnimHash { Name = "Bow_ChargeupRelease" }, AttackLengthFrameTime = 30f, AttackHitFrameTime = 5f, DamageEndFrameTime = 11f, AttackCamFwdHitFrameTime = 5f, ComboEarlyFrameTime = 9f }; val3.FPAttackChargeUpHitRight = new MeleeAttackData { AttackLengthTime = 1f, AttackHitTime = 2f / 15f, DamageStartTime = 0.1f, DamageEndTime = 7f / 15f, AttackCamFwdHitTime = 1f / 6f, ComboEarlyTime = 0.3f, Side = (eMeleeAttackSide)1, Anim = new AnimHash { Name = "Bow_ChargeupRelease" }, AttackLengthFrameTime = 30f, AttackHitFrameTime = 4f, DamageStartFrameTime = 3f, DamageEndFrameTime = 14f, AttackCamFwdHitFrameTime = 5f, ComboEarlyFrameTime = 9f }; val3.FPAttackChargeUpHitLeft = new MeleeAttackData { AttackLengthTime = 1f, AttackHitTime = 2f / 15f, DamageStartTime = 0.1f, DamageEndTime = 7f / 15f, AttackCamFwdHitTime = 1f / 6f, ComboEarlyTime = 0.3f, Side = (eMeleeAttackSide)2, Anim = new AnimHash { Name = "Bow_ChargeupRelease" }, AttackLengthFrameTime = 30f, AttackHitFrameTime = 4f, DamageStartFrameTime = 3f, DamageEndFrameTime = 14f, AttackCamFwdHitFrameTime = 5f, ComboEarlyFrameTime = 9f }; val3.TPAnimHashIdle = new AnimHash { Name = "Bow_idle" }; val3.TPAnimHashIdleCrouch = new AnimHash { Name = "Bow_Idle_crouch" }; val3.TPAnimHashAttackLeft = new AnimHash { Name = "Bow_SwingLeft" }; val3.TPAnimHashAttackLeftCrouch = new AnimHash { Name = "Bow_SwingLeft_crouch" }; val3.TPAnimHashAttackLeftCharge = new AnimHash { Name = "Bow_Charge_Left_Start" }; val3.TPAnimHashAttackLeftChargeCrouch = new AnimHash { Name = "Knife_Charge_Left_Start_Crouch" }; val3.TPAnimHashAttackLeftRelease = new AnimHash { Name = "Bow_Charge_Left_Release" }; val3.TPAnimHashAttackLeftReleaseCrouch = new AnimHash { Name = "Bow_Charge_Left_Release_Crouch" }; ((GameDataBlockBase)(object)val3).name = "Bow"; ((GameDataBlockBase)(object)val3).internalEnabled = true; MeleeArchetypeDataBlock val4 = GameDataBlockBase.AddNewBlock(); val4.PublicName = "Bow"; val4.NoiseLevel = (DamageNoiseLevel)1; val4.ChargedAttackDamage = 5.5f; val4.LightAttackDamage = 2f; val4.LightStaggerMulti = 1f; val4.ChargedStaggerMulti = 1f; val4.LightPrecisionMulti = 1f; val4.ChargedPrecisionMulti = 1f; val4.LightEnvironmentMulti = 0.8f; val4.ChargedEnvironmentMulti = 1.5f; val4.LightBackstabberMulti = 1f; val4.LightSleeperMulti = 1f; val4.ChargedSleeperMulti = 1.5f; val4.SkipLimbDestruction = false; val4.CameraDamageRayLength = 1.75f; val4.AttackSphereRadius = 0.25f; val4.PushDamageSphereRadius = 0.7f; val4.CanHitMultipleEnemies = false; val4.EvaluateHoldBeforeAttack = true; val4.PlayImpactEffect = true; val4.AllowRunningWhenCharging = true; val4.PlayerRunSpeedMultiWhileCharging = 1f; val4.MeleeAnimationSet = ((GameDataBlockBase)(object)val3).persistentID; val4.MeleeSFXSet = 3u; val4.ChargedAttackStaminaCost = new ActionCost { baseStaminaCostInCombat = 0f, baseStaminaCostOutOfCombat = 0f, resetRestingTimerInCombat = true, resetRestingTimerOutOfCombat = true }; val4.LightAttackStaminaCost = new ActionCost { baseStaminaCostInCombat = 0f, baseStaminaCostOutOfCombat = 0f, resetRestingTimerInCombat = true, resetRestingTimerOutOfCombat = true }; val4.PushStaminaCost = new ActionCost { baseStaminaCostInCombat = 0f, baseStaminaCostOutOfCombat = 0f, resetRestingTimerInCombat = true, resetRestingTimerOutOfCombat = true }; ((GameDataBlockBase)(object)val4).name = "Bow"; ((GameDataBlockBase)(object)val4).internalEnabled = true; GameObject val5 = new GameObject("MeleeWeaponFirstPersonBow"); ((Object)val5).hideFlags = (HideFlags)61; val5.layer = LayerManager.LAYER_FIRST_PERSON_ITEM; GameObject val6 = ComponentExt.AddChildGameObject((Component)(object)val5.transform, "MeleeBowWeaponAnimation"); GameObject val7 = ComponentExt.AddChildGameObject((Component)(object)val6.transform, "weapon_ref"); GameObject val8 = ComponentExt.AddChildGameObject((Component)(object)val7.transform, "melee_align"); val8.transform.localPosition = new Vector3(0f, 0f, 0f); val8.transform.localEulerAngles = new Vector3(0f, 0f, 0f); GameObject val9 = ComponentExt.AddChildGameObject((Component)(object)val6.transform, "LeftHand"); val9.transform.localPosition = new Vector3(0f, 0f, 0f); val9.transform.localEulerAngles = new Vector3(50f, 90f, 340f); GameObject val10 = ComponentExt.AddChildGameObject((Component)(object)val6.transform, "RightHand"); val10.transform.localPosition = new Vector3(0f, 0f, 0f); GameObject val11 = ComponentExt.AddChildGameObject((Component)(object)val7.transform, "DamageRefAttack"); GameObject val12 = ComponentExt.AddChildGameObject((Component)(object)val7.transform, "DamageRefPush"); MeleeWeaponFirstPerson val13 = val5.AddComponent(); Animator weaponAnimator = val6.AddComponent(); foreach (PlayerFPSBody item2 in Object.FindObjectsOfType()) { foreach (AnimationClip item3 in list) { ArrayExt.Add((Il2CppArrayBase)(object)item2.m_anim.runtimeAnimatorController.animationClips, item3); } } MeleeWeaponModelData obj4 = val6.AddComponent(); val13.WeaponAnimator = weaponAnimator; obj4.m_damageRefAttack = val11.transform; obj4.m_damageRefPush = val12.transform; obj4.m_animator = val13.WeaponAnimator; obj4.m_leftHandAlign = val9.transform; obj4.m_rightHandAlign = val10.transform; ((Item)val13).m_itemModelHolder = val8.transform; ((ItemEquippable)val13).MuzzleAlign = val5.transform; ((ItemEquippable)val13).m_isFirstPerson = true; val5.AddComponent(); AssetAPI.RegisterAsset("Assets/Hirnu/BowFP.prefab", (Object)(object)val5); GameObject val14 = new GameObject("MeleeWeaponThirdPersonBow"); ((Object)val14).hideFlags = (HideFlags)61; GameObject val15 = ComponentExt.AddChildGameObject((Component)(object)val14.transform, "Bow_GripAlign"); val15.transform.localPosition = new Vector3(0f, 0f, 0f); val15.transform.localEulerAngles = new Vector3(0f, 0f, 0f); GameObject val16 = ComponentExt.AddChildGameObject((Component)(object)val15.transform, "LeftHand"); val16.transform.localPosition = new Vector3(0f, -0.03f, -0.2f); val16.transform.localEulerAngles = new Vector3(285f, 264f, 176f); GameObject val17 = ComponentExt.AddChildGameObject((Component)(object)val15.transform, "RightHand"); GameObject val18 = ComponentExt.AddChildGameObject((Component)(object)val15.transform, "weapon_ref"); MeleeWeaponThirdPerson obj5 = val14.AddComponent(); Animator iKAnimator = val15.AddComponent(); ((ItemEquippable)obj5).MeleeAnimationData = val3; obj5.IKAnimator = iKAnimator; ((ItemEquippable)obj5).m_leftHandGripAlign = val16.transform; ((ItemEquippable)obj5).m_rightHandGripAlign = val17.transform; ((Item)obj5).LeftHandGripTrans = val16.transform; ((Item)obj5).RightHandGripTrans = val17.transform; ((Item)obj5).m_itemModelHolder = val18.transform; val14.AddComponent(); AssetAPI.RegisterAsset("Assets/Hirnu/BowTP.prefab", (Object)(object)val14); ItemFPSSettingsDataBlock obj6 = GameDataBlockBase.AddNewBlock(); obj6.canAim = false; obj6.onlyStartAimOnPressed = false; obj6.bodyOffsetLocal = new Vector3(0f, 0f, 0f); obj6.bodyRotationOffsetLocal = new Vector3(0f, 5f, 0.05f); obj6.localPosHip = new Vector3(0.24f, -0.23f, 0.67f); obj6.localRotHip = new Vector3(-20f, 34f, 72f); obj6.IdleAnimation = 14u; obj6.RunAnimation = 10u; obj6.JumpAnimation = 7u; obj6.LandAnimation = 8u; obj6.DofDefault = new DOFSettingsData { enabled = true, focusDistance = 90f, aperture = 0.15f, focalLength = 0.98f }; obj6.ItemCameraFOVZoom = 60; obj6.canRelax = false; obj6.allowRotToAimPos = false; ((GameDataBlockBase)(object)obj6).name = "MeleeWeaponBow"; ((GameDataBlockBase)(object)obj6).internalEnabled = true; itemfpspid = ((GameDataBlockBase)(object)obj6).persistentID; ItemDataBlock obj7 = GameDataBlockBase.AddNewBlock(); obj7.publicName = "Recurve Bow"; ((GameDataBlockBase)(object)obj7).name = "GEAR_RecurveBow"; obj7.LocalizedName = LocalizedText.op_Implicit(0u); obj7.terminalItemLongName = new LocalizedText { UntranslatedText = "" }; obj7.terminalItemShortName = LocalizedText.op_Implicit(new LocalizedText { UntranslatedText = "" }); obj7.addSerialNumberToName = true; obj7.registerInTerminalSystem = true; obj7.DimensionWarpType = (ItemWarpType)0; obj7.Shard = (AssetBundleShard)14; obj7.crosshair = (Crosshair)0; obj7.ShowCrosshairWhenAiming = false; obj7.GUIShowAmmoClip = true; obj7.GUIShowAmmoPack = true; obj7.GUIShowAmmoTotalRel = true; obj7.GUIShowAmmoInfinite = false; obj7.canMoveQuick = true; obj7.BlockToolAmmoRefill = false; obj7.ClassAmmoCostFactor = 1f; obj7.ConsumableAmmoMin = 0; obj7.ConsumableAmmoMax = 0; obj7.PickupPrefabs = new List(); obj7.InstancePrefabs = new List(); obj7.EquipTransitionTime = 1f; obj7.AimTransitionTime = 0.5f; obj7.FPSArmsAnim = "MeleeWeaponBow"; obj7.ThirdPersonFullbodyMovementSet = (eFullbodyPlayerMovementSet)4; obj7.SightLookAlign = ""; obj7.MuzzleAlign = ""; obj7.BackpackAlign = ""; ((GameDataBlockBase)(object)obj7).internalEnabled = true; obj7.FPSSettings = itemfpspid; obj7.LeftHandGripAnim = "Bow_Idle"; obj7.RightHandGripAnim = "Bow_Idle"; obj7.FirstPersonPrefabs = new List(); obj7.FirstPersonPrefabs.Add("Assets/Hirnu/BowFP.prefab"); obj7.ThirdPersonPrefabs = new List(); obj7.ThirdPersonPrefabs.Add("Assets/Hirnu/BowTP.prefab"); obj7.inventorySlot = (InventorySlot)10; obj7.LeftHandGripAlign = "LeftHand"; obj7.RightHandGripAlign = "RightHand"; obj7.audioEventEquip = "foley_equip_melee_generic"; obj7.HUDIcon = "GUI/Player/silouette/sledgehammer"; basepid = ((GameDataBlockBase)(object)obj7).persistentID; GearCategoryDataBlock obj8 = GameDataBlockBase.AddNewBlock(); obj8.PublicName = new LocalizedText { UntranslatedText = "Bow" }; obj8.Description = new LocalizedText { UntranslatedText = "boing" }; obj8.FPSArmPoseName = ""; obj8.HUDIcon = ""; obj8.BaseItem = basepid; obj8.IconRotationOffset = -90f; obj8.IconZoomOffset = 0.2f; obj8.ThirdPersonFullbodyMovement = (eFullbodyPlayerMovementSet)4; obj8.SemiArchetype = 0u; obj8.BurstArchetype = 0u; obj8.AutoArchetype = 0u; obj8.SemiBurstArchetype = 0u; obj8.MeleeArchetype = ((GameDataBlockBase)(object)val4).persistentID; ((GameDataBlockBase)(object)obj8).name = "MeleeBow"; gearcatpid = ((GameDataBlockBase)(object)obj8).persistentID; string text = "{\"Ver\":1,\"Name\":\"Recurve Bow\",\"Packet\":{\"Comps\":{\"Length\":6,\"a\":{\"c\":2,\"v\":BLARGLE},\"b\":{\"c\":3,\"v\":161},\"c\":{\"c\":4,\"v\":ITEMFPS},\"d\":{\"c\":48,\"v\":GARGLE},\"e\":{\"c\":21,\"v\":13}},\"MatTrans\":{\"tDecalA\":{\"scale\":0.1},\"tDecalB\":{\"scale\":0.1},\"tPattern\":{\"scale\":0.1}},\"publicName\":{\"data\":\"Recurve Bow\"}}}"; text = text.Replace("ITEMFPS", itemfpspid.ToString()); text = text.Replace("GARGLE", gearpid.ToString()); text = text.Replace("GURGLE", basepid.ToString()); text = text.Replace("BLARGLE", gearcatpid.ToString()); PlayerOfflineGearDataBlock val19 = new PlayerOfflineGearDataBlock { Type = (eOfflineGearType)1 }; ((GameDataBlockBase)val19).name = "Recurve Bow"; val19.GearJSON = text; GameDataBlockBase.AddBlock(val19, -1); } } public static int _BowMaxAmmo = 10; public static int _BowMaxDamage = 100; public static GameObject gearpart = null; public static uint gearpid = 0u; public static uint basepid = 0u; public static uint gearcatpid = 0u; public static uint itemfpspid = 0u; public static int arrowindex = 0; public static Dictionary> arrowinfo = new Dictionary> { [0] = new Dictionary { [0] = null }, [1] = new Dictionary { [0] = null }, [2] = new Dictionary { [0] = null }, [3] = new Dictionary { [0] = null }, [4] = new Dictionary { [0] = null }, [5] = new Dictionary { [0] = null }, [6] = new Dictionary { [0] = null }, [7] = new Dictionary { [0] = null }, [8] = new Dictionary { [0] = null }, [9] = new Dictionary { [0] = null }, [10] = new Dictionary { [0] = null }, [11] = new Dictionary { [0] = null }, [12] = new Dictionary { [0] = null }, [13] = new Dictionary { [0] = null }, [14] = new Dictionary { [0] = null }, [15] = new Dictionary { [0] = null }, [16] = new Dictionary { [0] = null } }; public override void Load() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_003c: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0063: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) ConfigFile val = new ConfigFile(Path.Combine(Paths.ConfigPath, "RecurveBow.cfg"), true); ConfigEntry val2 = val.Bind(new ConfigDefinition("General", "BowMaxAmmo"), 10, new ConfigDescription("Arrows provided to players from start?", (AcceptableValueBase)null, Array.Empty())); ConfigEntry obj = val.Bind(new ConfigDefinition("General", "BowMaxDamage"), 100, new ConfigDescription("Damage dealt by arrow released with highest charge?", (AcceptableValueBase)null, Array.Empty())); _BowMaxAmmo = val2.Value; _BowMaxDamage = obj.Value; new Harmony("RecurveBow").PatchAll(); NetworkAPI.RegisterEvent(BowNetInfo.NetworkIdentity, (Action)RecurveBow.ReceiveBowNetInfo); NetworkAPI.RegisterEvent(ArrowNetInfo.NetworkIdentity, (Action)RecurveBow.ReceiveArrowNetInfo); RecurveBow recurveBow = ((BasePlugin)this).AddComponent(); ClassInjector.RegisterTypeInIl2Cpp(); ClassInjector.RegisterTypeInIl2Cpp(); ClassInjector.RegisterTypeInIl2Cpp(); ClassInjector.RegisterTypeInIl2Cpp(); AssetShardManager.OnStartupAssetsLoaded += Action.op_Implicit((Action)recurveBow.Initialize); } } [GeneratedCode("VersionInfoGenerator", "2.0.0+git50a4b1a-master")] [CompilerGenerated] internal static class VersionInfo { public const string RootNamespace = "RecurveBow"; public const string Version = "1.0.0"; public const string VersionPrerelease = null; public const string VersionMetadata = null; public const string SemVer = "1.0.0"; public const string GitRevShort = null; public const string GitRevLong = null; public const string GitBranch = null; public const string GitTag = null; public const bool GitIsDirty = false; } }