public void Apply(ItemSpec target) { var expected = GetExpected(target.GetProperty((ItemSpecPropertyEnum)_property)); var newValue = GetNewValue(expected); target.SetProperty(new ItemSpecProperty(_property, newValue)); }
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)); }
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); } }
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)); }