// Token: 0x060035FB RID: 13819 RVA: 0x000C513C File Offset: 0x000C333C public virtual void DoWeaponEffects(Transform soundTransform, global::Socket muzzleSocket, bool firstPerson, global::ItemRepresentation itemRep) { this.PlayFireSound(soundTransform, firstPerson, itemRep); GameObject gameObject = muzzleSocket.InstantiateAsChild((!firstPerson) ? this.muzzleFlashWorld : this.muzzleflashVM, false); Object.Destroy(gameObject, 1f); }
// Token: 0x0600357D RID: 13693 RVA: 0x000C4494 File Offset: 0x000C2694 protected override bool InstallToViewModel(ref global::ModViewModelAddArgs a) { if (this.isMesh && !a.isMesh) { return(base.InstallToViewModel(ref a)); } if (!this.isMesh && a.isMesh) { return(base.InstallToViewModel(ref a)); } if (a.vm == null) { Debug.Log("Viewmodel null for item attachment..."); } if (this.attachObjectVM != null) { global::WeaponModRep weaponModRep = (global::WeaponModRep)a.modRep; GameObject gameObject; if (a.isMesh) { global::Socket socketByName = this.GetSocketByName(a.vm, this.attachSocketName); gameObject = (Object.Instantiate(this.attachObjectVM, socketByName.offset, Quaternion.Euler(socketByName.eulerRotate)) as GameObject); gameObject.transform.parent = socketByName.parent; gameObject.transform.localPosition = socketByName.offset; gameObject.transform.localEulerAngles = socketByName.eulerRotate; } else { gameObject = this.GetSocketByName(a.vm, this.attachSocketName).InstantiateAsChild(this.attachObjectVM, true); } gameObject.name = this.attachObjectVM.name; weaponModRep.SetAttached(gameObject, true); global::ViewModelAttachment component = gameObject.GetComponent <global::ViewModelAttachment>(); if (component) { if (this.socketOverrideName != string.Empty && component is global::VMAttachmentSocketOverride) { global::VMAttachmentSocketOverride vmattachmentSocketOverride = (global::VMAttachmentSocketOverride)component; this.SetSocketByname(a.vm, this.socketOverrideName, vmattachmentSocketOverride.socketOverride); if (this.modifyZoomOffset) { a.vm.punchScalar = this.punchScalar; a.vm.zoomOffset.z = this.zoomOffsetZ; } } component.viewModel = a.vm; } } return(true); }
// Token: 0x060022F9 RID: 8953 RVA: 0x00081A30 File Offset: 0x0007FC30 public static void Play(this AudioClip clip, global::Socket socket, bool parent, float volume, float pitch, AudioRolloffMode rolloffMode, float minDistance, float maxDistance, float doppler, float spread, bool bypassEffects) { if (socket != null) { return; } if (parent) { socket.Snap(); clip.Play(socket.attachParent, socket.position, socket.rotation, volume, pitch, rolloffMode, minDistance, maxDistance, doppler, spread, bypassEffects); } else { clip.Play(socket.position, socket.rotation, volume, pitch, rolloffMode, minDistance, maxDistance, doppler, spread, bypassEffects); } }
// Token: 0x0600357E RID: 13694 RVA: 0x000C4658 File Offset: 0x000C2858 protected override void UninstallFromViewModel(ref global::ModViewModelRemoveArgs a) { if (this.attachObjectVM != null) { global::WeaponModRep weaponModRep = (global::WeaponModRep)a.modRep; GameObject attached = weaponModRep.attached; global::ViewModelAttachment component = attached.GetComponent <global::ViewModelAttachment>(); if (component) { component.viewModel = null; } global::Socket socketByName = this.GetSocketByName(a.vm, this.attachSocketName); Transform transform = socketByName.attachParent; if (transform == null) { transform = socketByName.parent; } if (attached) { weaponModRep.SetAttached(null, true); Object.Destroy(attached.gameObject); } } }
// Token: 0x060032C4 RID: 12996 RVA: 0x000C0338 File Offset: 0x000BE538 public virtual void DoWeaponEffects(Transform soundTransform, Vector3 startPos, Vector3 endPos, global::Socket muzzleSocket, bool firstPerson, Component hitComponent, bool allowBlood, global::ItemRepresentation itemRep) { }
// Token: 0x0600357F RID: 13695 RVA: 0x000C46F0 File Offset: 0x000C28F0 public void SetSocketByname(global::Socket.Mapped vm, string name, global::Socket newSocket) { vm.socketMap.ReplaceSocket(name, newSocket); }
// Token: 0x06003325 RID: 13093 RVA: 0x000C1174 File Offset: 0x000BF374 public virtual void DoWeaponEffects(Transform soundTransform, Vector3 startPos, Vector3 endPos, global::Socket muzzleSocket, bool firstPerson, Component hitComponent, bool allowBlood, global::ItemRepresentation itemRep) { Vector3 vector = endPos - startPos; vector.Normalize(); bool flag = this.IsSilenced(itemRep); GameObject gameObject = (GameObject)Object.Instantiate(this.tracerPrefab, startPos, Quaternion.LookRotation(vector)); global::Tracer component = gameObject.GetComponent <global::Tracer>(); if (component) { component.Init(hitComponent, 406721553, this.GetBulletRange(itemRep), allowBlood); } if (flag) { component.startScale = Vector3.zero; } this.PlayFireSound(soundTransform, firstPerson, itemRep); if (!flag) { GameObject gameObject2 = muzzleSocket.InstantiateAsChild((!firstPerson) ? this.muzzleFlashWorld : this.muzzleflashVM, false); Object.Destroy(gameObject2, 1f); } }
// Token: 0x060022FD RID: 8957 RVA: 0x00081B00 File Offset: 0x0007FD00 public static bool FindSocket(this global::Socket.Map map, int index, out global::Socket socket) { return(map.Socket(index, out socket)); }
// Token: 0x060022FC RID: 8956 RVA: 0x00081AE0 File Offset: 0x0007FCE0 public static bool FindSocket(this global::Socket.Map map, string name, out global::Socket socket) { return(map.Socket(name, out socket)); }
// Token: 0x06002308 RID: 8968 RVA: 0x00081C88 File Offset: 0x0007FE88 public static bool FindSocket(this global::Socket.Mapped mapped, int index, out global::Socket socket) { return(mapped.GetSocketMapOrNull().Socket(index, out socket)); }
// Token: 0x06002307 RID: 8967 RVA: 0x00081C64 File Offset: 0x0007FE64 public static bool FindSocket(this global::Socket.Mapped mapped, string name, out global::Socket socket) { return(mapped.GetSocketMapOrNull().Socket(name, out socket)); }