Exemplo n.º 1
0
            public InternalGump2(MysteriousWisp wisp, Item item) : base(40, 40)
            {
                m_Wisp = wisp;
                m_Item = item;

                AddImageTiled(0, 0, 300, 180, 0xA8E);
                AddAlphaRegion(0, 0, 300, 180);
                AddBackground(150, 10, 130, 130, 0xBB8);

                AddHtml(10, 10, 150, 20, "<BASEFONT COLOR=#FFFFFF>CONFIRM PURCHASE:</BASEFONT>", false, false);
                AddHtmlLocalized(10, 30, 140, 20, item.LabelNumber, 0x7FFF, false, false);

                m_Available = m_Wisp.GetCostFor(item) > -1;
                string cost = m_Available ? m_Wisp.GetCostFor(item).ToString() : "No Longer Available";

                AddHtml(10, 100, 140, 20, "<BASEFONT COLOR=#FFFFFF>Despise Crystals:</BASEFONT>", false, false);
                AddHtml(10, 120, 140, 20, "<BASEFONT COLOR=#FFFFFF>" + cost + "</BASEFONT>", false, false);

                Rectangle2D b = ItemBounds.Table[item.ItemID];

                AddItem(210 - b.Width / 2 - b.X, 70 - b.Height / 2 - b.Y, item.ItemID, item.Hue);
                AddItemProperty(item.Serial);

                if (m_Available)
                {
                    AddButton(90, 150, 2128, 2129, 1, GumpButtonType.Reply, 0);
                }

                AddButton(155, 150, 2119, 2120, 0, GumpButtonType.Reply, 0);
            }
Exemplo n.º 2
0
            public override void GetChildProperties(ObjectPropertyList list, Item item)
            {
                base.GetChildProperties(list, item);

                MysteriousWisp wisp = RootParent as MysteriousWisp;

                if (wisp == null)
                {
                    return;
                }

                list.Add(1153425, wisp.GetCostFor(item).ToString()); // Price: ~1_AMT~ Despise Crystals
            }
Exemplo n.º 3
0
            public InternalGump2(MysteriousWisp wisp, Item item)
                : base(40, 40)
            {
                m_Wisp = wisp;
                m_Item = item;

                AddImageTiled(0, 0, 300, 180, 0xA8E);
                AddAlphaRegion(0, 0, 300, 180);
                AddBackground(150, 10, 130, 130, 0xBB8);

                AddHtml(10, 10, 150, 20, "<BASEFONT COLOR=#FFFFFF>CONFIRM PURCHASE:</BASEFONT>", false, false);
                AddHtmlLocalized(10, 30, 140, 20, item.LabelNumber, 0x7FFF, false, false);

                m_Available = m_Wisp.GetCostFor(item) > -1;
                string cost = m_Available ? m_Wisp.GetCostFor(item).ToString() : "No Longer Available";

                AddHtml(10, 100, 140, 20, "<BASEFONT COLOR=#FFFFFF>Despise Crystals:</BASEFONT>", false, false);
                AddHtml(10, 120, 140, 20, "<BASEFONT COLOR=#FFFFFF>"+cost+"</BASEFONT>", false, false);

                Rectangle2D b = ItemBounds.Table[item.ItemID];
                AddItem(210 - b.Width / 2 - b.X, 70 - b.Height / 2 - b.Y, item.ItemID, item.Hue);
                AddItemProperty(item.Serial);

                if (m_Available)
                    AddButton(90, 150, 2128, 2129, 1, GumpButtonType.Reply, 0);

                AddButton(155, 150, 2119, 2120, 0, GumpButtonType.Reply, 0);
            }
Exemplo n.º 4
0
            public InternalGump(MysteriousWisp wisp, Mobile viewer) : base(40, 40)
            {
                m_Wisp = wisp;
                if (!m_Viewers.Contains(viewer))
                {
                    m_Viewers.Add(viewer);
                }

                AddBackground(0, 0, 320, 404, 0x13BE);
                AddImageTiled(10, 10, 300, 20, 0xA40);
                AddImageTiled(10, 40, 300, 324, 0xA40);
                AddImageTiled(10, 374, 300, 20, 0xA40);
                AddAlphaRegion(10, 10, 300, 384);

                AddHtml(14, 12, 500, 20, "<BASEFONT COLOR=#FFFFFF>Mysterious Wisp Inventory</BASEFONT>", false, false);

                AddButton(10, 374, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
                AddHtmlLocalized(45, 376, 450, 20, 1011012, 0x7FFF, false, false); // CANCEL

                m_Items = new List <Item>(m_Wisp.Backpack.Items);
                int current = 0;

                for (int i = 0; i < m_Items.Count; i++)
                {
                    Item item = m_Items[i];

                    int page = current / 5 + 1;
                    int pos  = current % 5;

                    if (pos == 0)
                    {
                        if (page > 1)
                        {
                            AddButton(200, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, page);
                            AddHtmlLocalized(240, 376, 60, 20, 1043353, 0x7FFF, false, false); // Next
                        }

                        AddPage(page);

                        if (page > 1)
                        {
                            AddButton(100, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, page - 1);
                            AddHtmlLocalized(140, 376, 60, 20, 1011393, 0x7FFF, false, false); // Back
                        }
                    }

                    if (item != null && !item.Deleted)
                    {
                        int x = 14;
                        int y = (pos * 64) + 44;

                        Rectangle2D b = ItemBounds.Table[item.ItemID];

                        AddImageTiledButton(x, y, 0x918, 0x919, i + 1, GumpButtonType.Reply, 0, item.ItemID, item.Hue, 40 - b.Width / 2 - b.X, 30 - b.Height / 2 - b.Y);
                        AddItemProperty(item.Serial);

                        string cost = m_Wisp.GetCostFor(item) > -1 ? m_Wisp.GetCostFor(item).ToString("###,###,###") : "No Longer Available";

                        AddHtmlLocalized(x + 84, y, 250, 60, item.LabelNumber, 0x7FFF, false, false);
                        AddHtml(x + 84, y + 20, 250, 60, "<BASEFONT COLOR=#FFFFFF>" + cost + "</BASEFONT>", false, false);

                        current++;
                    }
                }
            }
Exemplo n.º 5
0
            public InternalGump(MysteriousWisp wisp, Mobile viewer)
                : base(40, 40)
            {
                m_Wisp = wisp;
                if (!m_Viewers.Contains(viewer))
                    m_Viewers.Add(viewer);

                AddBackground(0, 0, 320, 404, 0x13BE);
                AddImageTiled(10, 10, 300, 20, 0xA40);
                AddImageTiled(10, 40, 300, 324, 0xA40);
                AddImageTiled(10, 374, 300, 20, 0xA40);
                AddAlphaRegion(10, 10, 300, 384);

                AddHtml(14, 12, 500, 20, "<BASEFONT COLOR=#FFFFFF>Mysterious Wisp Inventory</BASEFONT>", false, false);

                AddButton(10, 374, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
                AddHtmlLocalized(45, 376, 450, 20, 1011012, 0x7FFF, false, false); // CANCEL

                m_Items = new List<Item>(m_Wisp.Backpack.Items);
                int current = 0;

                for (int i = 0; i < m_Items.Count; i++)
                {
                    Item item = m_Items[i];

                    int page = current / 5 + 1;
                    int pos = current % 5;

                    if (pos == 0)
                    {
                        if (page > 1)
                        {
                            AddButton(200, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, page);
                            AddHtmlLocalized(240, 376, 60, 20, 1043353, 0x7FFF, false, false); // Next
                        }

                        AddPage(page);

                        if (page > 1)
                        {
                            AddButton(100, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, page - 1);
                            AddHtmlLocalized(140, 376, 60, 20, 1011393, 0x7FFF, false, false); // Back
                        }
                    }

                    if (item != null && !item.Deleted)
                    {
                        int x = 14;
                        int y = (pos * 64) + 44;

                        Rectangle2D b = ItemBounds.Table[item.ItemID];

                        AddImageTiledButton(x, y, 0x918, 0x919, i + 1, GumpButtonType.Reply, 0, item.ItemID, item.Hue, 40 - b.Width / 2 - b.X, 30 - b.Height / 2 - b.Y);
                        AddItemProperty(item.Serial);

                        string cost = m_Wisp.GetCostFor(item) > -1 ? m_Wisp.GetCostFor(item).ToString("###,###,###") : "No Longer Available";

                        AddHtmlLocalized(x + 84, y, 250, 60, item.LabelNumber, 0x7FFF, false, false);
                        AddHtml(x + 84, y + 20, 250, 60, "<BASEFONT COLOR=#FFFFFF>" + cost + "</BASEFONT>", false, false);

                        current++;
                    }
                }
            }