Exemplo n.º 1
0
 public override void OnRemoved(IEntity parent)
 {
     if (parent is Mobile)
     {
         Mobile m = ( Mobile )parent;
         Hue = 0x0;
         Attributes.BonusStr        = 0;
         Attributes.DefendChance    = 0;
         ArmorAttributes.SelfRepair = 0;
         if (m.FindItemOnLayer(Layer.OneHanded) is EvocaricusSword)
         {
             EvocaricusSword sword = m.FindItemOnLayer(Layer.OneHanded) as EvocaricusSword;
             sword.Hue = 0x0;
             sword.Attributes.WeaponSpeed      = 0;
             sword.WeaponAttributes.SelfRepair = 0;
         }
         this.InvalidateProperties();
     }
     base.OnRemoved(parent);
 }
Exemplo n.º 2
0
        public override bool OnEquip(Mobile from)
        {
            Item item = from.FindItemOnLayer(Layer.OneHanded);

            if (item != null && item.GetType() == typeof(EvocaricusSword))
            {
                Effects.PlaySound(from.Location, from.Map, 503);
                from.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);

                Hue = 0x388;
                Attributes.BonusStr        = 10;
                Attributes.DefendChance    = 10;
                ArmorAttributes.SelfRepair = 3;
                EvocaricusSword sword = from.FindItemOnLayer(Layer.OneHanded) as EvocaricusSword;
                sword.Hue = 0x388;
                sword.Attributes.WeaponSpeed      = 35;
                sword.WeaponAttributes.SelfRepair = 3;

                from.SendLocalizedMessage(1072391);
            }
            this.InvalidateProperties();
            return(base.OnEquip(from));
        }