Пример #1
0
            public InternalGump(GorgonLens lens, IGorgonCharges item)
                : base(340, 340)
            {
                m_Lens = lens;
                m_Item = item;

                AddPage(0);

                AddBackground(0, 0, 291, 99, 0x13BE);
                AddImageTiled(5, 6, 280, 20, 0xA40);

                // Replace active Gorgon Lenses
                AddHtmlLocalized(9, 8, 280, 20, 1112597, 0x7FFF, false, false);

                AddImageTiled(5, 31, 280, 40, 0xA40);

                // The remaining charges of the active lenses will be lost. Do you wish to proceed?
                AddHtmlLocalized(9, 35, 272, 40, 1112598, 0x7FFF, false, false);

                AddButton(215, 73, 0xFB7, 0xFB8, 1, GumpButtonType.Reply, 0);
                AddHtmlLocalized(250, 75, 65, 20, 1006044, 0x7FFF, false, false);                   // OK

                AddButton(5, 73, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
                AddHtmlLocalized(40, 75, 100, 20, 1060051, 0x7FFF, false, false);                   // CANCEL
            }
Пример #2
0
        public void ApplyTo(Mobile from, IGorgonCharges item)
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);                   // That must be in your pack for you to use it.
            }
            else
            {
                from.SendLocalizedMessage(1112595);                   // You enhance the item with Gorgon Lenses!

                item.GorgonCharges = 26;
                item.GorgonQuality = m_Quality;

                Delete();
            }
        }
Пример #3
0
        public void ApplyTo( Mobile from, IGorgonCharges item )
        {
            if ( !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
            }
            else
            {
                from.SendLocalizedMessage( 1112595 ); // You enhance the item with Gorgon Lenses!

                item.GorgonCharges = 26;
                item.GorgonQuality = m_Quality;

                Delete();
            }
        }
Пример #4
0
        private void SelectItem_Callback(Mobile from, object o)
        {
            IGorgonCharges targeted = o as IGorgonCharges;

            if (targeted != null)
            {
                if (targeted.GorgonCharges > 0)
                {
                    from.CloseGump(typeof(InternalGump));
                    from.SendGump(new InternalGump(this, targeted));
                }
                else
                {
                    ApplyTo(from, targeted);
                }
            }
            else
            {
                from.SendLocalizedMessage(1112594);                   // You cannot place gorgon lenses on this.
            }
        }
Пример #5
0
 public static int ReadGorgonCharges(this IGorgonCharges obj, List <ClilocItemRec> properties)
 {
     return(!ClilocHelper.Contains(properties, 1112590) ? 0 : ClilocHelper.GetParams(properties, 1112590)[0]);
 }
Пример #6
0
            public InternalGump( GorgonLens lens, IGorgonCharges item )
                : base(340, 340)
            {
                m_Lens = lens;
                m_Item = item;

                AddPage( 0 );

                AddBackground( 0, 0, 291, 99, 0x13BE );
                AddImageTiled( 5, 6, 280, 20, 0xA40 );

                // Replace active Gorgon Lenses
                AddHtmlLocalized( 9, 8, 280, 20, 1112597, 0x7FFF, false, false );

                AddImageTiled( 5, 31, 280, 40, 0xA40 );

                // The remaining charges of the active lenses will be lost. Do you wish to proceed?
                AddHtmlLocalized( 9, 35, 272, 40, 1112598, 0x7FFF, false, false );

                AddButton( 215, 73, 0xFB7, 0xFB8, 1, GumpButtonType.Reply, 0 );
                AddHtmlLocalized( 250, 75, 65, 20, 1006044, 0x7FFF, false, false ); // OK

                AddButton( 5, 73, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0 );
                AddHtmlLocalized( 40, 75, 100, 20, 1060051, 0x7FFF, false, false ); // CANCEL
            }