Ejemplo 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!");
                }
            }
        }
Ejemplo n.º 2
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 && ( 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 if ( item is BaseWeapon && ( item is ThrowingGloves || item is PugilistGlove || item is PugilistGloves || item is PugilistMits ) )
				{
					GuildCraftingProcess process = new GuildCraftingProcess(from, (Item)obj);
					process.BeginProcess();
				}
				else if ( item is BaseArmor )
				{
					BaseArmor armor = (BaseArmor)item;

					if ( Server.Misc.MaterialInfo.IsAnyKindOfClothItem( item ) )
                    {
						GuildCraftingProcess process = new GuildCraftingProcess(from, (Item)obj);
						process.BeginProcess();
					}
					else
					{
						from.SendMessage( "You cannot enhance this item!" );
					}
				}
				else if ( item is BaseClothing )
				{
					GuildCraftingProcess process = new GuildCraftingProcess(from, (Item)obj);
					process.BeginProcess();
				}
                else
                {
					from.SendMessage( "You cannot enhance this item!" );
                }
            }
        }