Exemplo n.º 1
0
        public void OnTarget(Mobile from, object obj)
        {
            if (obj is Item)
            {
                Item item = (Item)obj;

                if (((Item)obj).RootParent != from)
                {
                    from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
                }
                else if (item is ILevelable)
                {
                    from.SendMessage("You cannot enhance legendary artifacts!");
                }
                else if (item is BaseJewel &&
                         !(MaterialInfo.IsMagicTorch(item)) &&
                         !(MaterialInfo.IsMagicTalisman(item)) &&
                         !(MaterialInfo.IsMagicCandle(item)) &&
                         !(item is MagicRobe) &&
                         !(item is MagicHat) &&
                         !(item is MagicCloak) &&
                         !(item is MagicBoots) &&
                         !(MaterialInfo.IsMagicBelt(item)) &&
                         !(MaterialInfo.IsMagicSash(item)))
                {
                    GuildCraftingProcess process = new GuildCraftingProcess(from, (Item)obj);
                    process.BeginProcess();
                }
                else
                {
                    from.SendMessage("You cannot enhance this item!");
                }
            }
        }