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!");
                }
            }
        }
Exemplo 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 BaseRanged)
                {
                    BaseWeapon weapon = (BaseWeapon)item;

                    if (Server.Misc.MaterialInfo.IsAnyKindOfWoodItem(item))
                    {
                        GuildCraftingProcess process = new GuildCraftingProcess(from, (Item)obj);
                        process.BeginProcess();
                    }
                    else
                    {
                        from.SendMessage("You cannot enhance this item!");
                    }
                }
                else
                {
                    from.SendMessage("You cannot enhance this item!");
                }
            }
        }
Exemplo n.º 3
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 || item is MagicBelt || item is MagicSash))
                {
                    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!");
                }
            }
        }
Exemplo n.º 4
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 BaseRanged)
                {
                    BaseWeapon weapon = (BaseWeapon)item;

                    if ((weapon.Resource == CraftResource.RegularWood) ||
                        (weapon.Resource == CraftResource.AshTree) ||
                        (weapon.Resource == CraftResource.CherryTree) ||
                        (weapon.Resource == CraftResource.EbonyTree) ||
                        (weapon.Resource == CraftResource.GoldenOakTree) ||
                        (weapon.Resource == CraftResource.HickoryTree) ||
                        (weapon.Resource == CraftResource.MahoganyTree) ||
                        (weapon.Resource == CraftResource.OakTree) ||
                        (weapon.Resource == CraftResource.PineTree) ||
                        (weapon.Resource == CraftResource.RosewoodTree) ||
                        (weapon.Resource == CraftResource.ElvenTree) ||
                        (weapon.Resource == CraftResource.WalnutTree))
                    {
                        GuildCraftingProcess process = new GuildCraftingProcess(from, (Item)obj);
                        process.BeginProcess();
                    }
                    else
                    {
                        from.SendMessage("You cannot enhance this item!");
                    }
                }
                else
                {
                    from.SendMessage("You cannot enhance this item!");
                }
            }
        }