Пример #1
0
 public override void OnItemLoaded(Item item)
 {
     base.OnItemLoaded(item);
     selectedType = GetSelectedType();
     if (selectedType.Equals(AmmoType.Generic) || selectedType.Equals(AmmoType.SemiAuto) || selectedType.Equals(AmmoType.ShotgunShell))
     {
         item.gameObject.AddComponent <Items.InteractiveAmmo>();
     }
     else if (selectedType.Equals(AmmoType.Magazine))
     {
         item.gameObject.AddComponent <Items.InteractiveMagazine>();
     }
     else if (selectedType.Equals(AmmoType.Pouch))
     {
         item.gameObject.AddComponent <Items.AmmoResupply>();
     }
 }
        public bool Equals(DestinyEquippingBlockDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     GearsetItemHash == input.GearsetItemHash ||
                     (GearsetItemHash.Equals(input.GearsetItemHash))
                     ) &&
                 (
                     UniqueLabel == input.UniqueLabel ||
                     (UniqueLabel != null && UniqueLabel.Equals(input.UniqueLabel))
                 ) &&
                 (
                     UniqueLabelHash == input.UniqueLabelHash ||
                     (UniqueLabelHash.Equals(input.UniqueLabelHash))
                 ) &&
                 (
                     EquipmentSlotTypeHash == input.EquipmentSlotTypeHash ||
                     (EquipmentSlotTypeHash.Equals(input.EquipmentSlotTypeHash))
                 ) &&
                 (
                     Attributes == input.Attributes ||
                     (Attributes != null && Attributes.Equals(input.Attributes))
                 ) &&
                 (
                     AmmoType == input.AmmoType ||
                     (AmmoType != null && AmmoType.Equals(input.AmmoType))
                 ) &&
                 (
                     DisplayStrings == input.DisplayStrings ||
                     (DisplayStrings != null && DisplayStrings.SequenceEqual(input.DisplayStrings))
                 ));
        }