コード例 #1
0
        /****/

        public static void AddArmourType(this ItemSpec item, ArmourWearLocation type)
        {
            var prop = item.GetProperty(ItemSpecPropertyEnum.ArmourType);

            if (prop == null)
            {
                item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.ArmourType, (short)type));
            }
            else
            {
                var value = prop.ShortValue | (short)type;
                item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.ArmourType, value));
            }
        }
コード例 #2
0
        public ItemSpec Clone(int id)
        {
            var ret = new ItemSpec(id);

            foreach (var item in _properties)
            {
                ret.SetProperty(item.Value);
            }

            return(ret);
        }
コード例 #3
0
 public static void SetWeaponNoiseDistance(this ItemSpec item, float value)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.NoiseRange, value));
 }
コード例 #4
0
        public static void SetModelName(this ItemSpec item, string value)
        {
            var spec = new ItemSpecProperty((short)ItemSpecPropertyEnum.ModelName, value);

            item.SetProperty(spec);
        }
コード例 #5
0
 public static void SetHealAmount(this ItemSpec item, short value)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.HealAmount, value));
 }
コード例 #6
0
        public static void SetHungerReduceAmount(this ItemSpec item, short value)
        {
            var spec = new ItemSpecProperty((short)ItemSpecPropertyEnum.HungerReduceAmount, value);

            item.SetProperty(spec);
        }
コード例 #7
0
        public static void SetDescription(this ItemSpec item, string value)
        {
            var spec = new ItemSpecProperty((short)ItemSpecPropertyEnum.Description, value);

            item.SetProperty(spec);
        }
コード例 #8
0
        public static void SetDurabilityMax(this ItemSpec item, short value)
        {
            var spec = new ItemSpecProperty((short)ItemSpecPropertyEnum.DurabilityMax, value);

            item.SetProperty(spec);
        }
コード例 #9
0
 public static void SetResourceAmount(this ItemSpec item, byte amount)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.ResourceAmount, amount));
 }
コード例 #10
0
 public static void SetReloadClipSize(this ItemSpec item, short size)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.ReloadClipSize, size));
 }
コード例 #11
0
 public static void SetClipSize(this ItemSpec item, short value)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.ClipSize, value));
 }
コード例 #12
0
 public static void SetMeleeRange(this ItemSpec item, float value)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.MeleeRange, value));
 }
コード例 #13
0
 public static void SetWeaponDelay(this ItemSpec item, uint value)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.UsageDelay, (int)value));
 }
コード例 #14
0
 public static void SetWeaponType(this ItemSpec item, WeaponTypes value)
 {
     item.SetProperty(new ItemSpecProperty((short)ItemSpecPropertyEnum.WeaponType, (short)value));
 }
コード例 #15
0
 public static void SetAmmoType(this ItemSpec item, AmmoType value)
 {
     item.SetProperty(new ItemSpecProperty((short)ItemSpecPropertyEnum.AmmoType, (short)value));
 }
コード例 #16
0
 public static void SetDefenceMultipliers(this ItemSpec item, Dictionary <DamageTypeEnum, float> multipliers)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.DefenceValues, multipliers));
 }
コード例 #17
0
 public static void SetResourceType(this ItemSpec item, ResourceType resource)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.ResouceType, (short)resource));
 }
コード例 #18
0
 public static void SetBulletSpread(this ItemSpec item, float value)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.BulletSpread, value));
 }
コード例 #19
0
        public static void SetCost(this ItemSpec item, int value)
        {
            var spec = new ItemSpecProperty((short)ItemSpecPropertyEnum.Cost, value);

            item.SetProperty(spec);
        }
コード例 #20
0
 public static void SetDamageMax(this ItemSpec item, float value)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.DamageMax, value));
 }
コード例 #21
0
 public static void SetDamageType(this ItemSpec item, DamageTypeEnum type)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.DamageType, (short)type));
 }
コード例 #22
0
 public static void SetBaseUsageTime(this ItemSpec item, short value)
 {
     item.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.BaseUsageTime, value));
 }