Пример #1
0
        public SummonFamiliarGump(Mobile from, SummonFamiliarEntry[] entries, SummonFamiliarSpell spell) : base(200, 100)
        {
            m_From    = from;
            m_Entries = entries;
            m_Spell   = spell;

            AddPage(0);

            AddBackground(10, 10, 250, 178, 9270);
            AddAlphaRegion(20, 20, 230, 158);

            AddImage(220, 20, 10464);
            AddImage(220, 72, 10464);
            AddImage(220, 124, 10464);

            AddItem(188, 16, 6883);
            AddItem(198, 168, 6881);
            AddItem(8, 15, 6882);
            AddItem(2, 168, 6880);

            AddHtmlLocalized(30, 26, 200, 20, 1060147, EnabledColor16); // Chose thy familiar...

            var necro  = from.Skills.Necromancy.Value;
            var spirit = from.Skills.SpiritSpeak.Value;

            for (var i = 0; i < entries.Length; ++i)
            {
                var name = entries[i].Name;

                var enabled = necro >= entries[i].ReqNecromancy && spirit >= entries[i].ReqSpiritSpeak;

                AddButton(27, 53 + i * 21, 9702, 9703, i + 1);

                if (name is int intName)
                {
                    AddHtmlLocalized(50, 51 + i * 21, 150, 20, intName, enabled ? EnabledColor16 : DisabledColor16);
                }
                else if (name is string strName)
                {
                    AddHtml(
                        50,
                        51 + i * 21,
                        150,
                        20,
                        $"<BASEFONT COLOR=#{(enabled ? EnabledColor32 : DisabledColor32):X6}>{strName}</BASEFONT>"
                        );
                }
            }
        }
Пример #2
0
        public SummonFamiliarGump(Mobile from, SummonFamiliarEntry[] entries, SummonFamiliarSpell spell)
            : base(200, 100)
        {
            m_From    = from;
            m_Entries = entries;
            m_Spell   = spell;

            AddPage(0);

            AddBackground(10, 10, 250, 178, 9270);
            AddAlphaRegion(20, 20, 230, 158);

            AddImage(220, 20, 10464);
            AddImage(220, 72, 10464);
            AddImage(220, 124, 10464);

            AddItem(188, 16, 6883);
            AddItem(198, 168, 6881);
            AddItem(8, 15, 6882);
            AddItem(2, 168, 6880);

            AddHtmlLocalized(30, 26, 200, 20, 1060147, EnabledColor16, false, false); // Chose thy familiar...

            double necro  = from.Skills[SkillName.Necromancy].Value;
            double spirit = from.Skills[SkillName.SpiritSpeak].Value;

            for (int i = 0; i < entries.Length; ++i)
            {
                object name = entries[i].Name;

                bool enabled = (necro >= entries[i].ReqNecromancy && spirit >= entries[i].ReqSpiritSpeak);

                AddButton(27, 53 + (i * 21), 9702, 9703, i + 1, GumpButtonType.Reply, 0);

                if (name is int)
                {
                    AddHtmlLocalized(50, 51 + (i * 21), 150, 20, (int)name, enabled ? EnabledColor16 : DisabledColor16, false, false);
                }
                else if (name is string)
                {
                    AddHtml(50, 51 + (i * 21), 150, 20, string.Format("<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", enabled ? EnabledColor32 : DisabledColor32, name), false, false);
                }
            }
        }
Пример #3
0
        public SummonFamiliarGump( Mobile from, SummonFamiliarEntry[] entries, SummonFamiliarSpell spell )
            : base(200, 100)
        {
            m_From = from;
            m_Entries = entries;
            m_Spell = spell;

            AddPage( 0 );

            AddBackground( 10, 10, 250, 178, 9270 );
            AddAlphaRegion( 20, 20, 230, 158 );

            AddImage( 220, 20, 10464 );
            AddImage( 220, 72, 10464 );
            AddImage( 220, 124, 10464 );

            AddItem( 188, 16, 6883 );
            AddItem( 198, 168, 6881 );
            AddItem( 8, 15, 6882 );
            AddItem( 2, 168, 6880 );

            AddHtmlLocalized( 30, 26, 200, 20, 1060147, EnabledColor16, false, false ); // Chose thy familiar...

            double necro = from.Skills[SkillName.Necromancy].Base;
            double spirit = from.Skills[SkillName.SpiritSpeak].Base;

            for ( int i = 0; i < entries.Length; ++i )
            {
                object name = entries[i].Name;

                bool enabled = ( necro >= entries[i].ReqNecromancy && spirit >= entries[i].ReqSpiritSpeak );

                AddButton( 27, 53 + (i * 21), 9702, 9703, i + 1, GumpButtonType.Reply, 0 );

                if ( name is int )
                    AddHtmlLocalized( 50, 51 + (i * 21), 150, 20, (int)name, enabled ? EnabledColor16 : DisabledColor16, false, false );
                else if ( name is string )
                    AddHtml( 50, 51 + (i * 21), 150, 20, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", enabled ? EnabledColor32 : DisabledColor32, name ), false, false );
            }
        }