Exemplo n.º 1
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            Container cont = targeted as Container;

            from.EndAction(typeof(Imbuing));

            if (!Soulforge.CheckProximity(from, 2))
            {
                from.SendLocalizedMessage(1080433);                   // You must be near a soulforge to magically unravel an item.
            }
            else if (!Soulforge.CheckQueen(from))
            {
                from.SendLocalizedMessage(1113736);                   // You must rise to the rank of noble in the eyes of the Gargoyle Queen before her majesty will allow you to use this soulforge.
            }
            else if (cont == null)
            {
                from.SendLocalizedMessage(1111814, "0\t0");                   // Unraveled: ~1_COUNT~/~2_NUM~ items
            }
            else if (!cont.IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1062334);                   // This item must be in your backpack to be used.
            }
            else if (HasSpecialMaterialItem(cont))
            {
                from.BeginAction(typeof(Imbuing));
                from.SendGump(new ConfirmUnravelContainerGump(cont));
            }
            else
            {
                Unraveling.UnravelContainer(from, cont);
            }
        }
Exemplo n.º 2
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            from.EndAction(typeof(Imbuing));

            if (info.ButtonID == 1)
            {
                if (!Soulforge.CheckProximity(from, 2))
                {
                    // You must be near a soulforge to magically unravel an item.
                    from.SendLocalizedMessage(1080433);
                }
                else if (!Soulforge.CheckQueen(from))
                {
                    // You must rise to the rank of noble in the eyes of the Gargoyle Queen before her majesty will allow you to use this soulforge.
                    from.SendLocalizedMessage(1113736);
                }
                else if (!m_Container.IsChildOf(from.Backpack))
                {
                    // This item must be in your backpack to be used.
                    from.SendLocalizedMessage(1062334);
                }
                else
                {
                    Unraveling.UnravelContainer(from, m_Container);
                }
            }
        }
Exemplo n.º 3
0
        protected override void OnTarget(Mobile from, object targeted)
        {
            Item      item      = targeted as Item;
            IImbuable toUnravel = targeted as IImbuable;

            from.EndAction(typeof(Imbuing));

            if (!Soulforge.CheckProximity(from, 2))
            {
                from.SendLocalizedMessage(1080433);                   // You must be near a soulforge to magically unravel an item.
            }
            else if (!Soulforge.CheckQueen(from))
            {
                from.SendLocalizedMessage(1113736);                   // You must rise to the rank of noble in the eyes of the Gargoyle Queen before her majesty will allow you to use this soulforge.
            }
            else if (item == null || !item.IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1080424);                   // The item must be in your backpack to magically unravel it.
            }
            else
            {
                Unraveling.TryUnravel(from, item, true);
            }
        }