Пример #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);
            }
        }
Пример #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);
                }
            }
        }
Пример #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);
            }
        }