public override int GetHashCode() { unchecked { var hashCode = Assistants?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (int)DeathDisposition; hashCode = (hashCode * 397) ^ IsAssassination.GetHashCode(); hashCode = (hashCode * 397) ^ IsGroundPound.GetHashCode(); hashCode = (hashCode * 397) ^ IsHeadshot.GetHashCode(); hashCode = (hashCode * 397) ^ IsMelee.GetHashCode(); hashCode = (hashCode * 397) ^ IsShoulderBash.GetHashCode(); hashCode = (hashCode * 397) ^ IsWeapon.GetHashCode(); hashCode = (hashCode * 397) ^ (Killer?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ KillerAgent.GetHashCode(); hashCode = (hashCode * 397) ^ (KillerAttachmentIds?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (int)KillerStockId; hashCode = (hashCode * 397) ^ (KillerWorldLocation?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Victim?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ VictimAgent.GetHashCode(); hashCode = (hashCode * 397) ^ (VictimAttachmentIds?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (int)VictimStockId; hashCode = (hashCode * 397) ^ (VictimWorldLocation?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (int)EventName; hashCode = (hashCode * 397) ^ (TimeSinceStart?.GetHashCode() ?? 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Assistants?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (int)DeathDisposition; hashCode = (hashCode * 397) ^ IsAssassination.GetHashCode(); hashCode = (hashCode * 397) ^ IsGroundPound.GetHashCode(); hashCode = (hashCode * 397) ^ IsHeadshot.GetHashCode(); hashCode = (hashCode * 397) ^ IsMelee.GetHashCode(); hashCode = (hashCode * 397) ^ IsShoulderBash.GetHashCode(); hashCode = (hashCode * 397) ^ IsWeapon.GetHashCode(); hashCode = (hashCode * 397) ^ (Killer != null ? Killer.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (int)KillerAgent; hashCode = (hashCode * 397) ^ (KillerWeaponAttachmentIds?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (int)KillerWeaponStockId; hashCode = (hashCode * 397) ^ (KillerWorldLocation != null ? KillerWorldLocation.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Victim != null ? Victim.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (int)VictimAgent; hashCode = (hashCode * 397) ^ (VictimAttachmentIds?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (int)VictimStockId; hashCode = (hashCode * 397) ^ (VictimWorldLocation != null ? VictimWorldLocation.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = Assistants?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ DeathDisposition.GetHashCode(); hashCode = (hashCode * 397) ^ ImpulseId.GetHashCode(); hashCode = (hashCode * 397) ^ IsAssassination.GetHashCode(); hashCode = (hashCode * 397) ^ IsGroundPound.GetHashCode(); hashCode = (hashCode * 397) ^ IsHeadshot.GetHashCode(); hashCode = (hashCode * 397) ^ IsMelee.GetHashCode(); hashCode = (hashCode * 397) ^ IsShoulderBash.GetHashCode(); hashCode = (hashCode * 397) ^ IsWeapon.GetHashCode(); hashCode = (hashCode * 397) ^ (Killer?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ KillerAgent.GetHashCode(); hashCode = (hashCode * 397) ^ (KillerWeaponAttachmentIds?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ KillerWeaponStockId.GetHashCode(); hashCode = (hashCode * 397) ^ (KillerWorldLocation?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ MedalId.GetHashCode(); hashCode = (hashCode * 397) ^ (Player?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ RoundIndex.GetHashCode(); hashCode = (hashCode * 397) ^ ShotsFired.GetHashCode(); hashCode = (hashCode * 397) ^ ShotsLanded.GetHashCode(); hashCode = (hashCode * 397) ^ TimeWeaponActiveAsPrimary.GetHashCode(); hashCode = (hashCode * 397) ^ (Victim?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ VictimAgent.GetHashCode(); hashCode = (hashCode * 397) ^ (VictimAttachmentIds?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ VictimStockId.GetHashCode(); hashCode = (hashCode * 397) ^ (VictimWorldLocation?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (WeaponAttachmentIds?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ WeaponStockId.GetHashCode(); hashCode = (hashCode * 397) ^ (int)EventName; hashCode = (hashCode * 397) ^ TimeSinceStart.GetHashCode(); return(hashCode); } }
public void _Equip() { bool success = false; IsEquipmentSlot[] slots = FindObjectsOfType(typeof(IsEquipmentSlot)) as IsEquipmentSlot[]; foreach (IsEquipmentSlot s in slots) { // if slot names match, then this is a compatible slot. // insert if this slot is open if (s.name == this.name) { if (s.IsEmpty()) { s.Insert(this); success = true; break; } } } if (success) { // apply one time buffs if (buffs) { if (!buffs.GetRecipient()) { buffs.SetRecipient(GetRecipient()); } buffs.Apply(); isEquipped = true; } // check if there's an animator override component AnimatorOverrideMixin ao = GetComponent <AnimatorOverrideMixin>(); if (ao) { // check if there's no recipient if (!ao.GetRecipient()) { ao.SetRecipient(GetRecipient()); } // execute ao.overrideAnimation(); isEquipped = true; } // check if its a weapon IsWeapon we = GetComponent <IsWeapon>(); if (we) { // check if there's no recipient if (!we.GetRecipient()) { we.SetRecipient(GetRecipient()); } // execute isEquipped = true; } } else { Debug.Log("IsEquipable::Equip: Error, no available slots to insert into! Try unequipping something will ya?"); } }