Ejemplo n.º 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (!(targeted is PlantClippings) || !((PlantClippings)targeted).IsChildOf(from.Backpack))
                {
                    from.SendLocalizedMessage(1046439);                       // That is not a valid target.
                    from.SendLocalizedMessage(1074794);                       // Target the material to use:

                    from.Target = new ClippingsTarget(m_CraftSystem, m_TypeRes, m_Tool, m_CraftItem);
                }
                else
                {
                    from.EndAction(typeof(CraftSystem));

                    PlantClippings clippings = targeted as PlantClippings;

                    if (from.Backpack == null || from.Backpack.GetAmount(typeof(Bottle)) < 1)
                    {
                        // You don't have any empty bottles.
                        from.SendGump(new CraftGump(from, m_CraftSystem, m_Tool, 1044558));
                    }
                    else
                    {
                        PlantPigment.DoCraft(from, m_CraftSystem, m_TypeRes, m_Tool, m_CraftItem, clippings);
                    }
                }
            }