Esempio n. 1
0
        public override bool OnEquip(Mobile from)
        {
            Item glove = from.FindItemOnLayer(Layer.Gloves);
            Item pants = from.FindItemOnLayer(Layer.Pants);
            Item arms  = from.FindItemOnLayer(Layer.Arms);

            if (glove != null && glove.GetType() == typeof(MageArmorGloves) && pants != null && pants.GetType() == typeof(MageArmorLegs) && arms != null && arms.GetType() == typeof(MageArmorArms))
            {
                Effects.PlaySound(from.Location, from.Map, 503);
                from.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);

                Hue = 0x47E;
                ArmorAttributes.SelfRepair = 3;
                Attributes.BonusInt        = 10;
                Attributes.SpellDamage     = 15;
                PhysicalBonus = 4;
                FireBonus     = 5;
                ColdBonus     = 3;
                PoisonBonus   = 4;
                EnergyBonus   = 4;


                MageArmorGloves gloves = from.FindItemOnLayer(Layer.Gloves) as MageArmorGloves;
                MageArmorLegs   legs   = from.FindItemOnLayer(Layer.Pants) as MageArmorLegs;
                MageArmorArms   arm    = from.FindItemOnLayer(Layer.Arms) as MageArmorArms;

                gloves.Hue = 0x47E;
                gloves.ArmorAttributes.SelfRepair = 3;
                gloves.PhysicalBonus = 4;
                gloves.FireBonus     = 5;
                gloves.ColdBonus     = 3;
                gloves.PoisonBonus   = 4;
                gloves.EnergyBonus   = 4;

                legs.Hue = 0x47E;
                legs.ArmorAttributes.SelfRepair = 3;
                legs.PhysicalBonus = 4;
                legs.FireBonus     = 5;
                legs.ColdBonus     = 3;
                legs.PoisonBonus   = 4;
                legs.EnergyBonus   = 4;

                arm.Hue = 0x47E;
                arm.ArmorAttributes.SelfRepair = 3;
                arm.PhysicalBonus = 4;
                arm.FireBonus     = 5;
                arm.ColdBonus     = 3;
                arm.PoisonBonus   = 4;
                arm.EnergyBonus   = 4;


                from.SendLocalizedMessage(1072391);
            }
            this.InvalidateProperties();
            return(base.OnEquip(from));
        }
Esempio n. 2
0
        public override void OnRemoved(object parent)
        {
            if (parent is Mobile)
            {
                Mobile m = ( Mobile )parent;
                Hue = 0x0;
                ArmorAttributes.SelfRepair = 0;
                PhysicalBonus = 0;
                FireBonus     = 0;
                ColdBonus     = 0;
                PoisonBonus   = 0;
                EnergyBonus   = 0;
                if (m.FindItemOnLayer(Layer.InnerTorso) is MageArmorChest && m.FindItemOnLayer(Layer.Pants) is MageArmorLegs && m.FindItemOnLayer(Layer.Arms) is MageArmorArms)
                {
                    MageArmorChest chest = m.FindItemOnLayer(Layer.InnerTorso) as MageArmorChest;
                    chest.Hue = 0x0;
                    chest.Attributes.BonusInt        = 0;
                    chest.Attributes.SpellDamage     = 0;
                    chest.ArmorAttributes.SelfRepair = 0;
                    chest.PhysicalBonus = 0;
                    chest.FireBonus     = 0;
                    chest.ColdBonus     = 0;
                    chest.PoisonBonus   = 0;
                    chest.EnergyBonus   = 0;


                    MageArmorLegs legs = m.FindItemOnLayer(Layer.Pants) as MageArmorLegs;
                    legs.Hue = 0x0;
                    legs.ArmorAttributes.SelfRepair = 0;
                    legs.PhysicalBonus = 0;
                    legs.FireBonus     = 0;
                    legs.ColdBonus     = 0;
                    legs.PoisonBonus   = 0;
                    legs.EnergyBonus   = 0;

                    MageArmorArms arm = m.FindItemOnLayer(Layer.Arms) as MageArmorArms;
                    arm.Hue = 0x0;
                    arm.ArmorAttributes.SelfRepair = 0;
                    arm.PhysicalBonus = 0;
                    arm.FireBonus     = 0;
                    arm.ColdBonus     = 0;
                    arm.PoisonBonus   = 0;
                    arm.EnergyBonus   = 0;
                }
                this.InvalidateProperties();
            }
            base.OnRemoved(parent);
        }