Beispiel #1
0
        public TProperty TryGetAssociatedItemProperty <TProperty>(uint itemId) where TProperty : class, IItemProperty
        {
            if (typeof(TProperty).IsAbstract)
            {
                ExceptionUtil.ThrowInvalidOperationException($"Cannot call this method with an abstract type, type: { typeof(TProperty).Name }.");
            }

            ItemPropertiesBox itemPropertiesBox = this.metaBox.ItemProperties;
            IReadOnlyList <ItemPropertyAssociationEntry> items = itemPropertiesBox.TryGetAssociatedProperties(itemId);

            if (items != null)
            {
                for (int i = 0; i < items.Count; i++)
                {
                    IItemProperty property = itemPropertiesBox.TryGetProperty(items[i].PropertyIndex);

                    if (property is TProperty requestedProperty)
                    {
                        return(requestedProperty);
                    }
                }
            }

            return(null);
        }
Beispiel #2
0
        public bool HasUnsupportedEssentialProperties(uint itemId)
        {
            ItemPropertiesBox itemPropertiesBox = this.metaBox.ItemProperties;
            IReadOnlyList <ItemPropertyAssociationEntry> items = itemPropertiesBox.TryGetAssociatedProperties(itemId);

            if (items != null)
            {
                for (int i = 0; i < items.Count; i++)
                {
                    ItemPropertyAssociationEntry entry = items[i];

                    if (entry.Essential)
                    {
                        IItemProperty property = itemPropertiesBox.TryGetProperty(entry.PropertyIndex);

                        if (property is null)
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
 public Bandage()
     : base("Bandage")
 {
     type       = "Medipack";
     rarity     = 1000;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(5,10)} Heilung]"),
     };
 }
 public Jagdgewehr()
     : base("Jagdgewehr")
 {
     type       = "Sniper";
     rarity     = 800;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[Sauber]|[1 Angriff]|[12 Dmg]"),
     };
 }
Beispiel #5
0
 public Item_04()
 {
     rarity     = 700;
     name       = "Kampfpanzer";
     type       = "Rüstung";
     attributes = new IItemProperty[]
     {
         new SingleIntervallProp("Dmg Reduction", new Intervall(0, 11)),
     };
 }
Beispiel #6
0
 public Item3() : base("Item3")
 {
     rarity      = 400;
     type        = "Pirates1";
     rarityTable = new RarityForwardTable("FischermensFriend");
     attributes  = new IItemProperty <string>[]
     {
         new SingleIntervallProp("Draufhauen", new Intervall(0, 133))
     };
 }
 public Machete()
     : base("Machete")
 {
     type       = "Nahkampf";
     rarity     = 800;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[Brutal]|[{Rand(2,3)} Angriffe]|[{Rand(1,2)} Dmg]"),
     };
 }
 public MCS870()
     : base("870-MCS")
 {
     type       = "Schrotflinte";
     rarity     = 700;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(4,5)} Kugeln pro Schuss]|[Brutal]|[{Rand(2,4)} Dmg]"),
     };
 }
 public ErsteHilfe()
     : base("ErsteHilfe")
 {
     type       = "Medipack";
     rarity     = 700;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(10,15)} Heilung]"),
     };
 }
 public Schrotze()
     : base("Schrotze")
 {
     type       = "Schrotflinte";
     rarity     = 1000;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(3,5)} Kugeln pro Schuss]|[{Rand(1,2)} Dmg][Brutal]"),
     };
 }
 public ZweiteHilfe()
     : base("ZweiteHilfe")
 {
     type       = "Medipack";
     rarity     = 100;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(15,20)} Heilung]"),
     };
 }
 public SatansTraene()
     : base("SatansTräne")
 {
     type       = "Medipack";
     rarity     = 10;
     attributes = new IItemProperty <string>[]
     {
         new NameOnlyProp("[Volle Heilung]"),
     };
 }
 public HeiligeOffensive()
     : base("Heilge Offensive")
 {
     type       = "Schrotflinte";
     rarity     = 10;
     attributes = new IItemProperty <string>[]
     {
         new NameOnlyProp("[Heilige Auswahl]|[6 Dmg][Brutal][M*******t(0.5)]"),
     };
 }
 public LVOAC_Gore()
     : base("LVOA-C Gore")
 {
     type       = "Sturmkarabiner";
     rarity     = 10;
     attributes = new IItemProperty <string>[]
     {
         new NameOnlyProp("[Still][Sauerei][Kuhl][40 Schuss][4 Schuss/Salve][10 Dmg]"),
     };
 }
 public Deagle()
     : base("Deagle")
 {
     type       = "Pistole";
     rarity     = 10;
     attributes = new IItemProperty <string>[]
     {
         new NameOnlyProp("[Laut][Brutal][Kuhl][12 Schuss][15 Dmg]"),
     };
 }
 public DerLeiseTod()
     : base("DerLeiseTod")
 {
     type       = "Sniper";
     rarity     = 10;
     attributes = new IItemProperty <string>[]
     {
         new NameOnlyProp("[5 Schuss][Still][Sauber][Kuhl][30 Dmg]"),
     };
 }
 public AzraelsDolch()
     : base("Azraels Dolch")
 {
     type       = "Nahkampf";
     rarity     = 10;
     attributes = new IItemProperty <string>[]
     {
         new NameOnlyProp("[Laut][Sauber][Kuhl][Tödlich][M*******t(5)]"),
     };
 }
 public SPAS12()
     : base("SPAS-12")
 {
     type       = "Schrotflinte";
     rarity     = 100;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(4,6)} Kugeln pro Schuss]|[Brutal]|[{Rand(5,8)} Dmg]"),
     };
 }
 public M95()
     : base("M95")
 {
     type       = "Sniper";
     rarity     = 100;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(4,6)} Schuss]|[25 Dmg][Brutal][Laut]"),
     };
 }
 public Harke()
     : base("Harke")
 {
     type       = "Nahkampf";
     rarity     = 800;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[Brutal]|[{Rand(4,5)} Spitzen]|[{Rand(1,2)} Dmg]"),
     };
 }
 public M14Carbon()
     : base("M14 Carbon")
 {
     type       = "DMR";
     rarity     = 100;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(12,18)} Schuss]|[2 Schuss/Salve]|[{Rand(13,15)} Dmg]"),
     };
 }
 public AK416()
     : base("AK416")
 {
     type       = "Sturmgewehr";
     rarity     = 100;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(25,35)} Schuss]|[{Rand(2,4)} Schuss/Salve]|[{Rand(5,8)} Dmg]"),
     };
 }
 public Tanto()
     : base("Tanto")
 {
     type       = "Nahkampf";
     rarity     = 700;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(20,25)} Dmg]"),
         WEAPON_MODIFY_KNIFE
     };
 }
 public M24()
     : base("M24")
 {
     type       = "Sniper";
     rarity     = 400;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(4,6)} Schuss]|[18 Dmg][Sauber]"),
         WEAPON_MODIFY_RIFLE
     };
 }
 public Armour_Boss()
     : base("Mythril Haut")
 {
     type       = "Leichte Rüstung";
     rarity     = 10;
     attributes = new IItemProperty <string>[]
     {
         new NameOnlyProp("[9 Dmg Reduction]"),
         ARMOUR_MODIFY_LIGHT
     };
 }
 public Heavy_Armour_Elite_Soldat()
     : base("Schwerer Kampfpanzer")
 {
     type       = "Schwere Rüstung";
     rarity     = 100;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(5,8)} Dmg Reduction]"),
         ARMOUR_MODIFY_HEAVY
     };
 }
 public Light_Armour_Elite_Soldat()
     : base("Leichter Kampfpanzer")
 {
     type       = "Leichte Rüstung";
     rarity     = 100;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(3,5)} Dmg Reduction]"),
         ARMOUR_MODIFY_LIGHT
     };
 }
 public Light_Armour_Soldat()
     : base("Standard Körperpanzer")
 {
     type       = "Leichte Rüstung";
     rarity     = 700;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(2,3)} Dmg Reduction]"),
         ARMOUR_MODIFY_LIGHT
     };
 }
 public Medium_Armour_Elite_Soldat()
     : base("Mittlerer Kampfpanzer")
 {
     type       = "Mittlere Rüstung";
     rarity     = 100;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(4,6)} Dmg Reduction]"),
         ARMOUR_MODIFY_MEDIUM
     };
 }
 public M1911()
     : base("M1911")
 {
     type       = "Pistole";
     rarity     = 550;
     attributes = new IItemProperty <string>[]
     {
         new FuncProp <string>(() => $"[{Rand(4,6)} Schuss]|[{Rand(2,4)} Dmg]"),
         WEAPON_MODIFY_PISTOL
     };
 }