Example #1
0
        public void Apply(ItemSpec target)
        {
            var expected = GetExpected(target.GetProperty((ItemSpecPropertyEnum)_property));
            var newValue = GetNewValue(expected);

            target.SetProperty(new ItemSpecProperty(_property, newValue));
        }
Example #2
0
        public void Apply(ItemSpec target)
        {
            var expected = GetExpected(target.GetProperty((ItemSpecPropertyEnum)_property));
            var newValue = (int)StaticRng.Random.RandomBell(_min, expected, _max);

            target.SetProperty(new ItemSpecProperty(_property, newValue));
        }
Example #3
0
        protected override void DeserializeImpl(IIncomingMessageStream messageStream)
        {
            var id         = messageStream.ReadInt32();
            var properties = messageStream.ReadEntityProperties <ItemSpecProperty>();

            ItemSpec = new ItemSpec(id);
            foreach (var prop in properties)
            {
                ItemSpec.SetProperty(prop);
            }
        }
Example #4
0
        public void Apply(ItemSpec target)
        {
            var material = GetRandomMaterial();

            target.SetProperty(new ItemSpecProperty(ItemSpecPropertyEnum.Material, material));

            var multipliers = WearableItemStatsCache.GetBaseSlotDefences(_slot);
            var defences    = WearableItemStatsCache.GetBaseDamageDefences(material, multipliers);

            target.SetDefenceMultipliers(defences);
            target.SetDurabilityMax(WearableItemStatsCache.GetBaseMaxDurability(material));
        }