Exemplo n.º 1
0
 public void Equip(IEquipContext context)
 {
     if (!appliedToItem) // the affix was applied directly to the item, so we don't apply its effect on equip
     {
         affix.OnEquip(context, quality);
     }
 }
Exemplo n.º 2
0
        public override void OnEquip(IEquipContext context, QualityRoll quality)
        {
            if (rangeVariable == null)
            {
                throw new InvalidOperationException("Magnitude range not supplied to AttributeAffix.");
            }

            OnEquip(context, quality, rangeVariable.Value);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Applies the item's effects (i.e. affixes and other special effects) to the player.
 /// </summary>
 public abstract void ApplyEffects(IEquipContext context);
Exemplo n.º 4
0
 public abstract void OnEquip(IEquipContext context, QualityRoll quality);
Exemplo n.º 5
0
        /*
         * This overload is provided to allow for a simple run-time change to the value. Originally this
         * was implemented to allow a compound attribute to substitute a different value for the range without
         * having to rebuild new attribute affixes for every sub-attribute. e.g. a compound affix that improves
         * all primary stats would have references to an affix for each primary stat, but we want to provide lesser
         * values for the range for balance reasons (otherwise, the compound attribute would be 4x as strong as the
         * individual affixes).
         */

        /// <summary>
        /// Provide a different value for the magnitude range than the one attached to this affix.
        /// </summary>
        public void OnEquip(IEquipContext context, QualityRoll quality, MagnitudeRange rangeOverride)
        {
            context.ApplyAttributeBuff(BuildEnhancement(quality, rangeOverride));
        }