public static void AddSetBonus(Mobile to, SetItem setID)
        {
            int temp;

            for (int i = 0; i < to.Items.Count; i++)
            {
                if (to.Items[i] is ISetItem)
                {
                    ISetItem setItem = (ISetItem)to.Items[i];

                    if (setItem.IsSetItem && setItem.SetID == setID)
                    {
                        if (setItem.LastEquipped)
                        {
                            setItem.SetSkillBonuses.AddTo(to);
                        }
                        temp                = to.Items[i].Hue;
                        to.Items[i].Hue     = setItem.SetHue;
                        setItem.SetHue      = temp;
                        setItem.SetEquipped = true;
                        Timer.DelayCall <Item>(item => item.InvalidateProperties(), to.Items[i]);
                    }
                }
            }

            Effects.PlaySound(to.Location, to.Map, 0x1F7);
            to.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
            to.SendLocalizedMessage(1072391);             // The magic of your armor combines to assist you!
        }
Exemple #2
0
        public static void Remove(Mobile from, SetItem setID, Item item)
        {
            if (item is ISetItem)
            {
                ISetItem setItem = (ISetItem)item;

                if (setItem.IsSetItem && setItem.SetID == setID)
                {
                    if (setItem.LastEquipped)
                    {
                        if (from != null)
                        {
                            RemoveStatBonuses(from, item);
                        }

                        setItem.SetSkillBonuses.Remove();
                    }

                    if (setID != SetItem.Bestial)
                    {
                        int temp = item.Hue;
                        item.Hue       = setItem.SetHue;
                        setItem.SetHue = temp;
                    }

                    setItem.SetEquipped  = false;
                    setItem.LastEquipped = false;
                    item.InvalidateProperties();
                }
            }
        }
Exemple #3
0
        public static bool SetCraftedWith(Mobile from, ISetItem setItem, CraftResource resource)
        {
            int count = 0;

            for (int i = 0; i < from.Items.Count && count < setItem.Pieces; i++)
            {
                if (from.Items[i] is BaseArmor)
                {
                    BaseArmor armor = (BaseArmor)from.Items[i];

                    if (armor.IsSetItem && armor.SetID == setItem.SetID && armor.Resource == resource)
                    {
                        count += 1;
                    }
                }
                else if (from.Items[i] is BaseWeapon)
                {
                    BaseWeapon weapon = (BaseWeapon)from.Items[i];

                    if (weapon.IsSetItem && weapon.SetID == setItem.SetID && weapon.Resource == resource)
                    {
                        count += 1;
                    }
                }
            }

            if (count == setItem.Pieces)
            {
                return(true);
            }

            return(false);
        }
 public static MagazineList GetMagazineList(ISetItem itemSetter)
 {
     _itemSetter = itemSetter;
     if (_magazineList == null)
     {
         _magazineList = new MagazineList();
     }
     return(_magazineList);
 }
Exemple #5
0
 public static NewspaperList GetNewspaperList(ISetItem newspaperSetter)
 {
     _newspaperSetter = newspaperSetter;
     if (_newspaperList == null)
     {
         _newspaperList = new NewspaperList();
     }
     return(_newspaperList);
 }
Exemple #6
0
 public static BookList GetBookList(ISetItem bookSetter)
 {
     _bookSetter = bookSetter;
     if (_bookList == null)
     {
         _bookList = new BookList();
     }
     return(_bookList);
 }
Exemple #7
0
        public override void Add(ISetItem <Tuple1 <T> > elem)
        {
            // Element-only set.
            if (!(elem is SetElement <Tuple1 <T> >))
            {
                throw new ElemPrimitive.ElementOnlySetException();
            }

            base.Add(elem);
        }
Exemple #8
0
        public static bool ResistsBonusPerPiece(ISetItem item)
        {
            switch (item.SetID)
            {
            default: return(false);

            case SetItem.Virtue:
            case SetItem.Aloron:
            case SetItem.Darden: return(true);
            }
        }
Exemple #9
0
 public virtual void Add(ISetItem <T> elem)
 {
     if (elems.Contains(elem))
     {
         return;
     }
     if (BeforeElementAdded != null && !BeforeElementAdded.Invoke(elem))
     {
         return;
     }
     elems.Add(elem);
     ElemCount = elems.OfType <SetElement <T> >().Count();
     ElementAdded?.Invoke(elem);
 }
        public static void GetSetProperties(ObjectPropertyList list, ISetItem setItem)
        {
            AosAttributes attrs;

            if (setItem is BaseWeapon)
            {
                attrs = ((BaseWeapon)setItem).Attributes;
            }
            else if (setItem is BaseArmor)
            {
                attrs = ((BaseArmor)setItem).Attributes;
            }
            else if (setItem is BaseClothing)
            {
                attrs = ((BaseClothing)setItem).Attributes;
            }
            else if (setItem is BaseQuiver)
            {
                attrs = ((BaseQuiver)setItem).Attributes;
            }
            else if (setItem is BaseJewel)
            {
                attrs = ((BaseJewel)setItem).Attributes;
            }
            else
            {
                attrs = new AosAttributes(setItem as Item);
            }

            bool full   = setItem.SetEquipped;
            int  pieces = setItem.Pieces;
            int  prop;

            if (setItem is IBeggingAttire)
            {
                IBeggingAttire attire = (IBeggingAttire)setItem;

                if (setItem.SetEquipped && attire.SetBonus > 0)
                {
                    list.Add("Begging Bonus: {0}%", attire.SetBonus.ToString());
                }
            }

            if (setItem.SetSkillBonuses.Skill_1_Value != 0)
            {
                list.Add(1072502, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_1_Name), setItem.SetSkillBonuses.Skill_1_Value);                 // ~1_skill~ ~2_val~ (total)
            }
        }
Exemple #11
0
        public static bool ResistsBonusPerPiece(ISetItem item)
        {
            if (item.SetPhysicalBonus == 0 && item.SetFireBonus == 0 && item.SetColdBonus == 0 && item.SetPoisonBonus == 0 && item.SetEnergyBonus == 0)
            {
                return(true);
            }

            switch (item.SetID)
            {
            default: return(false);

            case SetItem.Virtue:
            case SetItem.Aloron:
            case SetItem.Darden: return(true);
            }
        }
Exemple #12
0
        /// <summary>
        /// Adds pairs of related elements to the relation
        /// </summary>
        /// <param name="elem">The pairs of related elements</param>
        public override void Add(ISetItem <Tuple1 <T> > elem)
        {
            //// Element-only set.
            //if (!(elem is SetElement<Tuple1<T>> setElem))
            //    throw new ElementOnlySetException();

            //// Pairs only.
            //setElem.x is Tupl

            //if (setElem.x.Degree() != 1)
            //    throw new WrongDegreeTupleException();

            //base.Add(elem);

            //var tuple = setElem.x;

            // PAROU
            //if (Symmetric)
            //{
            //    base.Add(new Tuple<T, T>(tuple.b, tuple.a));
            //}

            //if (Reflexive)
            //{
            //    base.Add(new Tuple<T, T>(tuple.a, tuple.a));
            //    base.Add(new Tuple<T, T>(tuple.b, tuple.b));
            //}

            //if (Transitive)
            //{
            //    // For all x with which b relates, inserts (a, x)
            //    // For all x which are related to a, inserts (x, b)
            //    var xWithB = elems
            //        .Cast<SetElement<Tuple2<T, T>>>()
            //        .Where(e => e.x.a.Equals(tuple.b))
            //        .Select(e => e.x.b).ToList();
            //    var xWithA = elems
            //        .Cast<SetElement<Tuple2<T, T>>>()
            //        .Where(e => e.x.b.Equals(tuple.a))
            //        .Select(e => e.x.a).ToList();
            //    foreach (var x in xWithB)
            //        base.Add(new Tuple2<T, T>(tuple.a, x));
            //    foreach (var x in xWithA)
            //        base.Add(new Tuple2<T, T>(x, tuple.b));
            //}
        }
Exemple #13
0
        public static int GetSetTotalResist(Mobile m, ResistanceType resist)
        {
            int total = 0;

            for (var index = 0; index < m.Items.Count; index++)
            {
                Item item = m.Items[index];

                if (item is ISetItem setItem && setItem.IsSetItem && setItem.SetEquipped)
                {
                    ISetItem sItem = setItem;

                    switch (resist)
                    {
                    case ResistanceType.Physical:
                        total += item.PhysicalResistance + sItem.SetPhysicalBonus;
                        break;

                    case ResistanceType.Fire:
                        total += item.FireResistance + sItem.SetFireBonus;
                        break;

                    case ResistanceType.Cold:
                        total += item.ColdResistance + sItem.SetColdBonus;
                        break;

                    case ResistanceType.Poison:
                        total += item.PoisonResistance + sItem.SetPoisonBonus;
                        break;

                    case ResistanceType.Energy:
                        total += item.EnergyResistance + sItem.SetEnergyBonus;
                        break;
                    }
                }
            }

            return(total);
        }
Exemple #14
0
        public static bool FullSetEquipped(Mobile from, SetItem setID, int pieces)
        {
            int equipped = 0;

            for (int i = 0; i < from.Items.Count && equipped < pieces; i++)
            {
                if (from.Items[i] is ISetItem)
                {
                    ISetItem setItem = (ISetItem)from.Items[i];

                    if (setItem.IsSetItem && setItem.SetID == setID)
                    {
                        equipped += 1;
                    }
                }
            }

            if (equipped == pieces)
            {
                return(true);
            }

            return(false);
        }
Exemple #15
0
        public static int GetSetTotalResist(Mobile m, ResistanceType resist)
        {
            int total = 0;

            foreach (Item item in m.Items.Where(i => i is ISetItem && ((ISetItem)i).IsSetItem && ((ISetItem)i).SetEquipped))
            {
                ISetItem sItem = item as ISetItem;

                switch (resist)
                {
                case ResistanceType.Physical: total += item.PhysicalResistance + sItem.SetPhysicalBonus; break;

                case ResistanceType.Fire: total += item.FireResistance + sItem.SetFireBonus; break;

                case ResistanceType.Cold: total += item.ColdResistance + sItem.SetColdBonus; break;

                case ResistanceType.Poison: total += item.PoisonResistance + sItem.SetPoisonBonus; break;

                case ResistanceType.Energy: total += item.EnergyResistance + sItem.SetEnergyBonus; break;
                }
            }

            return(total);
        }
        public static void AddSetBonus(Mobile to, SetItem setID)
        {
            int temp;

            for (int i = 0; i < to.Items.Count; i++)
            {
                if (to.Items[i] is ISetItem)
                {
                    ISetItem setItem = (ISetItem)to.Items[i];

                    if (setItem.IsSetItem && setItem.SetID == setID)
                    {
                        if (setItem.LastEquipped)
                        {
                            AddStatBonuses(to, to.Items[i], setItem.SetAttributes.BonusStr, setItem.SetAttributes.BonusDex, setItem.SetAttributes.BonusInt);

                            setItem.SetSkillBonuses.AddTo(to);
                        }

                        if (setID != SetItem.Bestial)
                        {
                            temp            = to.Items[i].Hue;
                            to.Items[i].Hue = setItem.SetHue;
                            setItem.SetHue  = temp;
                        }

                        setItem.SetEquipped = true;
                        to.Items[i].InvalidateProperties();
                    }
                }
            }

            Effects.PlaySound(to.Location, to.Map, 0x1F7);
            to.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
            to.SendLocalizedMessage(1072391); // The magic of your armor combines to assist you!
        }
Exemple #17
0
        public static int GetValue(Mobile m, AosAttribute attribute)
        {
            if (!Core.AOS)
            {
                return(0);
            }

            List <Item> items = m.Items;
            int         value = 0;

            for (int i = 0; i < items.Count; ++i)
            {
                Item obj = items[i];

                if (obj is BaseWeapon)
                {
                    AosAttributes attrs = ((BaseWeapon)obj).Attributes;

                    if (attrs != null)
                    {
                        value += attrs[attribute];
                    }

                    if (attribute == AosAttribute.Luck)
                    {
                        value += ((BaseWeapon)obj).GetLuckBonus();
                    }
                }
                else if (obj is BaseArmor)
                {
                    AosAttributes attrs = ((BaseArmor)obj).Attributes;

                    if (attrs != null)
                    {
                        value += attrs[attribute];
                    }

                    if (attribute == AosAttribute.Luck)
                    {
                        value += ((BaseArmor)obj).GetLuckBonus();
                    }
                }
                else if (obj is BaseJewel)
                {
                    AosAttributes attrs = ((BaseJewel)obj).Attributes;

                    if (attrs != null)
                    {
                        value += attrs[attribute];
                    }
                }
                else if (obj is BaseClothing)
                {
                    AosAttributes attrs = ((BaseClothing)obj).Attributes;

                    if (attrs != null)
                    {
                        value += attrs[attribute];
                    }
                }
                else if (obj is Spellbook)
                {
                    AosAttributes attrs = ((Spellbook)obj).Attributes;

                    if (attrs != null)
                    {
                        value += attrs[attribute];
                    }
                }
                else if (obj is BaseQuiver)
                {
                    AosAttributes attrs = ((BaseQuiver)obj).Attributes;

                    if (attrs != null)
                    {
                        value += attrs[attribute];
                    }
                }
                else if (obj is BaseTalisman)
                {
                    AosAttributes attrs = ((BaseTalisman)obj).Attributes;

                    if (attrs != null)
                    {
                        value += attrs[attribute];
                    }
                }

                #region Mondain's Legacy
                if (attribute == AosAttribute.WeaponDamage)
                {
                    if (BaseMagicalFood.IsUnderInfluence(m, MagicalFood.WrathGrapes))
                    {
                        value += 10;                         // TODO check
                    }
                }
                else if (attribute == AosAttribute.SpellDamage)
                {
                    if (BaseMagicalFood.IsUnderInfluence(m, MagicalFood.WrathGrapes))
                    {
                        value += 5;                         // TODO check
                    }
                }
                else if (attribute == AosAttribute.CastSpeed)
                {
                    if (MonstrousInterredGrizzle.UnderCacophonicAttack(m) || LadyMelisande.UnderPutridNausea(m))
                    {
                        value -= 3;                         // TODO check
                    }
                }
                else if (attribute == AosAttribute.WeaponSpeed || LadyMelisande.UnderPutridNausea(m))
                {
                    if (MonstrousInterredGrizzle.UnderCacophonicAttack(m))
                    {
                        value -= 3;                         // TODO check
                    }
                }

                if (obj is ISetItem)
                {
                    ISetItem item = (ISetItem)obj;

                    AosAttributes attrs = item.SetAttributes;

                    if (attrs != null && item.LastEquipped)
                    {
                        value += attrs[attribute];
                    }
                }
                #endregion
            }

            return(value);
        }
Exemple #18
0
        public static void GetSetProperties(ObjectPropertyList list, ISetItem setItem)
        {
            AosAttributes attrs;

            if (setItem is BaseWeapon weapon)
            {
                attrs = weapon.Attributes;
            }
            else if (setItem is BaseArmor armor)
            {
                attrs = armor.Attributes;
            }
            else if (setItem is BaseClothing clothing)
            {
                attrs = clothing.Attributes;
            }
            else if (setItem is BaseQuiver quiver)
            {
                attrs = quiver.Attributes;
            }
            else if (setItem is BaseJewel jewel)
            {
                attrs = jewel.Attributes;
            }
            else
            {
                attrs = new AosAttributes(setItem as Item);
            }

            bool full             = setItem.SetEquipped;
            int  pieces           = setItem.Pieces;
            bool beserk           = setItem.SetID == SetItem.Bestial;
            bool bardmasterybonus = setItem.BardMasteryBonus;

            int prop;

            if (setItem is IFishingAttire attire)
            {
                if (setItem.SetEquipped && attire.SetBonus > 0)
                {
                    list.Add(1151573, attire.SetBonus.ToString()); //Fish Bait Strength +~1_VAL~% (total)
                }
                else if (attire.BaitBonus > 0)
                {
                    list.Add(1151572, attire.BaitBonus.ToString()); //Fish Bait Strength +~1_VAL~%
                }
            }

            if (beserk)
            {
                list.Add(1151542, "5");// Berserk ~1_VAL~ (total)
            }
            if (setItem.BardMasteryBonus)
            {
                list.Add(1151571); //Mastery Bonus Cooldown: 15 min.
            }
            if ((prop = setItem.SetAttributes.RegenHits) != 0)
            {
                list.Add(full ? 1080244 : 1154369, (full ? prop + (attrs.RegenHits * pieces) : prop).ToString()); // hit point regeneration ~1_val~ (total)
            }

            /*if ( (prop = setItem.SetAttributes.RegenStam) != 0 )
             * list.Add(full ? 1154365 : 1154370, (full ? prop + (attrs.ReganStam * pieces) : prop).ToString()); // stamina regeneration ~1_val~ (total)*/

            if ((prop = setItem.SetAttributes.RegenMana) != 0)
            {
                list.Add(full ? 1080245 : 1080250, (full ? prop + (attrs.RegenMana * pieces) : prop).ToString()); // mana regeneration ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.DefendChance) != 0)
            {
                list.Add(full ? 1073493 : 1060408, (full ? prop + (attrs.DefendChance * pieces) : prop).ToString()); // defense chance increase ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.AttackChance) != 0)
            {
                list.Add(full ? 1073490 : 1154366, (full ? prop + (attrs.AttackChance * pieces) : prop).ToString()); // hit chance increase ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.BonusStr) != 0)
            {
                list.Add(full ? 1072514 : 1060485, (full ? prop + (attrs.BonusStr * pieces) : prop).ToString()); // strength bonus ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.BonusDex) != 0)
            {
                list.Add(full ? 1072503 : 1080447, (full ? prop + (attrs.BonusDex * pieces) : prop).ToString());// dexterity bonus ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.BonusInt) != 0)
            {
                list.Add(full ? 1072381 : 1080439, (full ? prop + (attrs.BonusInt * pieces) : prop).ToString());// intelligence bonus ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.BonusHits) != 0)
            {
                list.Add(full ? 1080360 : 1080358, (full ? prop + (attrs.BonusHits * pieces) : prop).ToString());// hit point increase ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.BonusStam) != 0)
            {
                list.Add(full ? 1060484 : 1060484, (full ? prop + (attrs.BonusStam * pieces) : prop).ToString()); // stamina increase ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.BonusMana) != 0)
            {
                list.Add(full ? 1060439 : 1060439, (full ? prop + (attrs.BonusMana * pieces) : prop).ToString()); // mana increase ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.WeaponDamage) != 0)
            {
                list.Add(full ? 1151216 : 1154367, (full ? prop + (attrs.WeaponDamage * pieces) : prop).ToString()); // damage increase ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.WeaponSpeed) != 0)
            {
                list.Add(full ? 1074323 : 1154368, (full ? prop + (attrs.WeaponSpeed * pieces) : prop).ToString()); // swing speed increase ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.SpellDamage) != 0)
            {
                list.Add(full ? 1072380 : 1060483, (full ? prop + (attrs.SpellDamage * pieces) : prop).ToString()); // spell damage increase ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.CastRecovery) != 0)
            {
                list.Add(full ? 1080242 : 1080248, (full ? prop + (attrs.CastRecovery * pieces) : prop).ToString()); // faster cast recovery ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.CastSpeed) != 0)
            {
                list.Add(full ? 1080243 : 1080247, (full ? prop + (attrs.CastSpeed * pieces) : prop).ToString()); // faster casting ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.LowerManaCost) != 0)
            {
                list.Add(full ? 1073488 : 1060433, (full ? prop + (attrs.LowerManaCost * pieces) : prop).ToString());// lower mana cost ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.LowerRegCost) != 0)
            {
                list.Add(full ? 1080441 : 1080440, (full ? prop + (attrs.LowerRegCost * pieces) : prop).ToString()); // lower reagent cost ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.ReflectPhysical) != 0)
            {
                list.Add(full ? 1072513 : 1060442, (prop + attrs.ReflectPhysical).ToString()); // reflect physical damage ~1_val~% (total)
            }

            /*if ( (prop = setItem.SetAttributes.EnhancePotions) != 0 )
             * list.Add( , (full ? prop + (attrs.EnhancePotions * pieces) : prop).ToString()); enhance potions ~1_val~% (total)*/

            if ((prop = setItem.SetAttributes.Luck) != 0)
            {
                list.Add(full ? 1073489 : 1080246, (full ? prop + (attrs.Luck * pieces) : prop).ToString()); // luck ~1_val~% (total)
            }
            if (!setItem.SetEquipped && setItem.SetAttributes.NightSight != 0)
            {
                list.Add(1060441); // night sight
            }
            if (setItem.SetSkillBonuses.Skill_1_Value != 0)
            {
                list.Add(1072502, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_1_Name), setItem.SetSkillBonuses.Skill_1_Value); // ~1_skill~ ~2_val~ (total)
            }
        }
Exemple #19
0
 public bool Contains(ISetItem <T> set) =>
 set is SetElement <T> se?                                          // Element comparison
 elems.OfType <SetElement <T> >().Any(e => e.Equals(se)) :
     elems.Cast <Set <T> >().Any(e => e.Equals((Set <T>)set));      // Set comparison
Exemple #20
0
 public bool Equals(ISetItem <T> other) => other is SetElement <T> se && Equals(se);
Exemple #21
0
        public static void GetSetProperties(ObjectPropertyList list, ISetItem setItem)
        {
            int prop;

            if ((prop = setItem.SetAttributes.RegenHits) != 0)
            {
                list.Add(1080244, prop.ToString());                   // hit point regeneration ~1_val~ (total)
            }

            /*if ( (prop = setItem.SetAttributes.RegenStam) != 0 )
             *      list.Add( , prop.ToString() ); // stamina regeneration ~1_val~ (total)*/

            if ((prop = setItem.SetAttributes.RegenMana) != 0)
            {
                list.Add(1080245, prop.ToString());                   // mana regeneration ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.DefendChance) != 0)
            {
                list.Add(1073493, prop.ToString());                   // defense chance increase ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.AttackChance) != 0)
            {
                list.Add(1073490, prop.ToString());                   // hit chance increase ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.BonusStr) != 0)
            {
                list.Add(1072514, prop.ToString());                   // strength bonus ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.BonusDex) != 0)
            {
                list.Add(1072503, prop.ToString());                   // dexterity bonus ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.BonusInt) != 0)
            {
                list.Add(1072381, prop.ToString());                   // intelligence bonus ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.BonusHits) != 0)
            {
                list.Add(1080360, prop.ToString());                   // hit point increase ~1_val~ (total)
            }

            /*if ( (prop = setItem.SetAttributes.BonusStam) != 0 )
             *      list.Add( , prop.ToString() ); // stamina increase ~1_val~ (total)
             *
             * if ( (prop = setItem.SetAttributes.BonusMana) != 0 )
             *      list.Add( , prop.ToString() ); // mana increase ~1_val~ (total)
             *
             * if ( (prop = setItem.SetAttributes.WeaponDamage ) != 0 )
             *      list.Add( , prop.ToString() ); // damage increase ~1_val~% (total)*/

            if ((prop = setItem.SetAttributes.WeaponSpeed) != 0)
            {
                list.Add(1074323, prop.ToString());                   // swing speed increase ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.SpellDamage) != 0)
            {
                list.Add(1072380, prop.ToString());                   // spell damage increase ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.CastRecovery) != 0)
            {
                list.Add(1080242, prop.ToString());                   // faster cast recovery ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.CastSpeed) != 0)
            {
                list.Add(1080243, prop.ToString());                   // faster casting ~1_val~ (total)
            }
            if ((prop = setItem.SetAttributes.LowerManaCost) != 0)
            {
                list.Add(1073488, prop.ToString());                   // lower mana cost ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.LowerRegCost) != 0)
            {
                list.Add(1080441, prop.ToString());                   // lower reagent cost ~1_val~% (total)
            }
            if ((prop = setItem.SetAttributes.ReflectPhysical) != 0)
            {
                list.Add(1072513, prop.ToString());                   // reflect physical damage ~1_val~% (total)
            }

            /*if ( (prop = setItem.SetAttributes.EnhancePotions) != 0 )
             *      list.Add( , prop.ToString() ); enhance potions ~1_val~% (total)*/

            if ((prop = setItem.SetAttributes.Luck) != 0)
            {
                list.Add(1073489, prop.ToString());                   // luck ~1_val~% (total)
            }
            if (!setItem.SetEquipped && setItem.SetAttributes.NightSight != 0)
            {
                list.Add(1060441);                   // night sight
            }
            if (setItem.SetSkillBonuses.Skill_1_Value != 0)
            {
                list.Add(1072502, "{0}\t{1}", "#" + (1044060 + (int)setItem.SetSkillBonuses.Skill_1_Name), setItem.SetSkillBonuses.Skill_1_Value);                      // ~1_skill~ ~2_val~ (total)
            }
        }
Exemple #22
0
		public static void GetSetProperties( ObjectPropertyList list, ISetItem setItem )
		{
			int prop;
	            		
			if ( (prop = setItem.SetAttributes.RegenHits) != 0 )
				list.Add( 1080244, prop.ToString() ); // hit point regeneration ~1_val~ (total)

			/*if ( (prop = setItem.SetAttributes.RegenStam) != 0 )
				list.Add( , prop.ToString() ); // stamina regeneration ~1_val~ (total)*/

			if ( (prop = setItem.SetAttributes.RegenMana) != 0 )
				list.Add( 1080245, prop.ToString() ); // mana regeneration ~1_val~ (total)

			if ( (prop = setItem.SetAttributes.DefendChance) != 0 )
				list.Add( 1073493, prop.ToString() ); // defense chance increase ~1_val~% (total)
			
			if ( (prop = setItem.SetAttributes.AttackChance) != 0 )
				list.Add( 1073490, prop.ToString() ); // hit chance increase ~1_val~% (total)
			
			if ( (prop = setItem.SetAttributes.BonusStr) != 0 )
				list.Add( 1072514, prop.ToString() ); // strength bonus ~1_val~ (total)
			
			if ( (prop = setItem.SetAttributes.BonusDex) != 0 )
				list.Add( 1072503, prop.ToString() ); // dexterity bonus ~1_val~ (total)
			
			if ( (prop = setItem.SetAttributes.BonusInt) != 0 )
				list.Add( 1072381, prop.ToString() ); // intelligence bonus ~1_val~ (total)
						
			if ( (prop = setItem.SetAttributes.BonusHits) != 0 )
				list.Add( 1080360, prop.ToString() ); // hit point increase ~1_val~ (total)
			
			/*if ( (prop = setItem.SetAttributes.BonusStam) != 0 )
				list.Add( , prop.ToString() ); // stamina increase ~1_val~ (total)
			
			if ( (prop = setItem.SetAttributes.BonusMana) != 0 )
				list.Add( , prop.ToString() ); // mana increase ~1_val~ (total)
			
			if ( (prop = setItem.SetAttributes.WeaponDamage ) != 0 )
				list.Add( , prop.ToString() ); // damage increase ~1_val~% (total)*/
			
			if ( (prop = setItem.SetAttributes.WeaponSpeed) != 0 )
				list.Add( 1074323, prop.ToString() ); // swing speed increase ~1_val~% (total)	
			
			if ( (prop = setItem.SetAttributes.SpellDamage) != 0 )
				list.Add( 1072380, prop.ToString() ); // spell damage increase ~1_val~% (total)
									
			if ( (prop = setItem.SetAttributes.CastRecovery) != 0 )
				list.Add( 1080242, prop.ToString() ); // faster cast recovery ~1_val~ (total)
									
			if ( (prop = setItem.SetAttributes.CastSpeed) != 0 )
				list.Add( 1080243, prop.ToString() ); // faster casting ~1_val~ (total)
			
			if ( (prop = setItem.SetAttributes.LowerManaCost) != 0 )
				list.Add( 1073488, prop.ToString() ); // lower mana cost ~1_val~% (total)
			
			if ( (prop = setItem.SetAttributes.LowerRegCost) != 0 )
				list.Add( 1080441, prop.ToString() ); // lower reagent cost ~1_val~% (total)
			
			if ( (prop = setItem.SetAttributes.ReflectPhysical) != 0 )
				list.Add( 1072513, prop.ToString() ); // reflect physical damage ~1_val~% (total)
			
			/*if ( (prop = setItem.SetAttributes.EnhancePotions) != 0 )
				list.Add( , prop.ToString() ); enhance potions ~1_val~% (total)*/
			
			if ( (prop = setItem.SetAttributes.Luck) != 0 )
				list.Add( 1073489, prop.ToString() ); // luck ~1_val~% (total)

			if ( !setItem.SetEquipped && setItem.SetAttributes.NightSight != 0 )
				list.Add( 1060441 ); // night sight
	            		
			if ( setItem.SetSkillBonuses.Skill_1_Value != 0 )
				list.Add( 1072502, "{0}\t{1}", "#" + ( 1044060 + (int) setItem.SetSkillBonuses.Skill_1_Name ), setItem.SetSkillBonuses.Skill_1_Value ); // ~1_skill~ ~2_val~ (total)
		}
Exemple #23
0
		public static bool SetCraftedWith( Mobile from, ISetItem setItem, CraftResource resource )
		{
			int count = 0;
		
			for ( int i = 0; i < from.Items.Count && count < setItem.Pieces; i ++ )
			{
				if ( from.Items[ i ] is BaseArmor )
				{
					BaseArmor armor = (BaseArmor) from.Items[ i ];
					
					if ( armor.IsSetItem && armor.SetID == setItem.SetID && armor.Resource == resource )
						count += 1;
				}				
				else if ( from.Items[ i ] is BaseWeapon )
				{
					BaseWeapon weapon = (BaseWeapon) from.Items[ i ];
					
					if ( weapon.IsSetItem && weapon.SetID == setItem.SetID && weapon.Resource == resource )
						count += 1;
				}
			}
			
			if ( count == setItem.Pieces )
				return true;
			
			return false;
		}