コード例 #1
0
        public SmallBODAcceptGump(Mobile from, SmallBOD deed) : base(50, 50)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump(typeof(LargeBODAcceptGump));
            m_From.CloseGump(typeof(SmallBODAcceptGump));

            AddPage(0);

            AddBackground(25, 10, 430, 264, 5054);

            AddImageTiled(33, 20, 413, 245, 2624);
            AddAlphaRegion(33, 20, 413, 245);

            AddImage(20, 5, 10460);
            AddImage(430, 5, 10460);
            AddImage(20, 249, 10460);
            AddImage(430, 249, 10460);

            AddHtmlLocalized(190, 25, 120, 20, 1045133, 0x7FFF, false, false); // A bulk order
            AddHtmlLocalized(40, 48, 350, 20, 1045135, 0x7FFF, false, false);  // Ah!  Thanks for the goods!  Would you help me out?

            AddHtmlLocalized(40, 72, 210, 20, 1045138, 0x7FFF, false, false);  // Amount to make:
            AddLabel(250, 72, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(40, 96, 120, 20, 1045136, 0x7FFF, false, false); // Item requested:
            AddItem(385, 96, deed.Graphic);
            AddHtmlLocalized(40, 120, 210, 20, deed.Number, 0xFFFFFF, false, false);

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(40, 144, 210, 20, 1045140, 0x7FFF, false, false); // Special requirements to meet:

                if (deed.RequireExceptional)
                {
                    AddHtmlLocalized(40, 168, 350, 20, 1045141, 0x7FFF, false, false); // All items must be exceptional.
                }
                if (deed.Material != BulkMaterialType.None)
                {
                    AddHtmlLocalized(40, deed.RequireExceptional ? 192 : 168, 350, 20, GetMaterialNumberFor(deed.Material), 0x7FFF, false, false); // All items must be made with x material.
                }
            }

            AddHtmlLocalized(40, 216, 350, 20, 1045139, 0x7FFF, false, false); // Do you want to accept this order?

            AddButton(100, 240, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(135, 240, 120, 20, 1006044, 0x7FFF, false, false); // Ok

            AddButton(275, 240, 4005, 4007, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(310, 240, 120, 20, 1011012, 0x7FFF, false, false); // CANCEL
        }
コード例 #2
0
        public SmallBODGump(Mobile from, SmallBOD deed) : base(25, 25)
        {
            m_From = from;
            m_Deed = deed;

            m_From.CloseGump(typeof(LargeBODGump));
            m_From.CloseGump(typeof(SmallBODGump));

            AddPage(0);

            AddBackground(50, 10, 455, 260, 5054);
            AddImageTiled(58, 20, 438, 241, 2624);
            AddAlphaRegion(58, 20, 438, 241);

            AddImage(45, 5, 10460);
            AddImage(480, 5, 10460);
            AddImage(45, 245, 10460);
            AddImage(480, 245, 10460);

            AddHtmlLocalized(225, 25, 120, 20, 1045133, 0x7FFF, false, false); // A bulk order

            AddHtmlLocalized(75, 48, 250, 20, 1045138, 0x7FFF, false, false);  // Amount to make:
            AddLabel(275, 48, 1152, deed.AmountMax.ToString());

            AddHtmlLocalized(275, 76, 200, 20, 1045153, 0x7FFF, false, false); // Amount finished:
            AddHtmlLocalized(75, 72, 120, 20, 1045136, 0x7FFF, false, false);  // Item requested:

            AddItem(410, 72, deed.Graphic);

            AddHtmlLocalized(75, 96, 210, 20, deed.Number, 0x7FFF, false, false);
            AddLabel(275, 96, 0x480, deed.AmountCur.ToString());

            if (deed.RequireExceptional || deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(75, 120, 200, 20, 1045140, 0x7FFF, false, false); // Special requirements to meet:
            }
            if (deed.RequireExceptional)
            {
                AddHtmlLocalized(75, 144, 300, 20, 1045141, 0x7FFF, false, false); // All items must be exceptional.
            }
            if (deed.Material != BulkMaterialType.None)
            {
                AddHtmlLocalized(75, deed.RequireExceptional ? 168 : 144, 300, 20, GetMaterialNumberFor(deed.Material), 0x7FFF, false, false); // All items must be made with x material.
            }
            AddButton(125, 192, 4005, 4007, 2, GumpButtonType.Reply, 0);
            AddHtmlLocalized(160, 192, 300, 20, 1045154, 0x7FFF, false, false); // Combine this deed with the item requested.

            AddButton(125, 216, 4005, 4007, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(160, 216, 120, 20, 1011441, 0x7FFF, false, false); // EXIT
        }
コード例 #3
0
        public Item Reconstruct()
        {
            SmallBOD bod = null;

            if (m_DeedType == BODType.Smith)
            {
                bod = new SmallSmithBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material);
            }
            else if (m_DeedType == BODType.Tailor)
            {
                bod = new SmallTailorBOD(m_AmountCur, m_AmountMax, m_ItemType, m_Number, m_Graphic, m_RequireExceptional, m_Material);
            }

            return(bod);
        }
コード例 #4
0
        public BOBSmallEntry(SmallBOD bod)
        {
            m_ItemType           = bod.Type;
            m_RequireExceptional = bod.RequireExceptional;

            if (bod is SmallTailorBOD)
            {
                m_DeedType = BODType.Tailor;
            }
            else if (bod is SmallSmithBOD)
            {
                m_DeedType = BODType.Smith;
            }

            m_Material  = bod.Material;
            m_AmountCur = bod.AmountCur;
            m_AmountMax = bod.AmountMax;
            m_Number    = bod.Number;
            m_Graphic   = bod.Graphic;
        }
コード例 #5
0
ファイル: Rewards.cs プロジェクト: libcs/game.ultimaonline.io
 public virtual int ComputeGold(SmallBOD bod)
 {
     return(ComputeGold(bod.AmountMax, bod.RequireExceptional, bod.Material, 1, bod.Type));
 }
コード例 #6
0
ファイル: Rewards.cs プロジェクト: libcs/game.ultimaonline.io
        public virtual int ComputeFame(SmallBOD bod)
        {
            int points = ComputePoints(bod) / 50;

            return(points * points);
        }
コード例 #7
0
 public SmallBODTarget(SmallBOD deed) : base(18, false, TargetFlags.None)
 {
     m_Deed = deed;
 }
コード例 #8
0
        public void EndCombine(Mobile from, object o)
        {
            if (o is Item && ((Item)o).IsChildOf(from.Backpack))
            {
                if (o is SmallBOD)
                {
                    SmallBOD small = (SmallBOD)o;

                    LargeBulkEntry entry = null;

                    for (int i = 0; entry == null && i < m_Entries.Length; ++i)
                    {
                        if (m_Entries[i].Details.Type == small.Type)
                        {
                            entry = m_Entries[i];
                        }
                    }

                    if (entry == null)
                    {
                        from.SendLocalizedMessage(1045160); // That is not a bulk order for this large request.
                    }
                    else if (m_RequireExceptional && !small.RequireExceptional)
                    {
                        from.SendLocalizedMessage(1045161); // Both orders must be of exceptional quality.
                    }
                    else if (m_Material >= BulkMaterialType.DullCopper && m_Material <= BulkMaterialType.Valorite && small.Material != m_Material)
                    {
                        from.SendLocalizedMessage(1045162); // Both orders must use the same ore type.
                    }
                    else if (m_Material >= BulkMaterialType.Spined && m_Material <= BulkMaterialType.Barbed && small.Material != m_Material)
                    {
                        from.SendLocalizedMessage(1049351); // Both orders must use the same leather type.
                    }
                    else if (m_AmountMax != small.AmountMax)
                    {
                        from.SendLocalizedMessage(1045163); // The two orders have different requested amounts and cannot be combined.
                    }
                    else if (small.AmountCur < small.AmountMax)
                    {
                        from.SendLocalizedMessage(1045164); // The order to combine with is not completed.
                    }
                    else if (entry.Amount >= m_AmountMax)
                    {
                        from.SendLocalizedMessage(1045166); // The maximum amount of requested items have already been combined to this deed.
                    }
                    else
                    {
                        entry.Amount += small.AmountCur;
                        small.Delete();

                        from.SendLocalizedMessage(1045165); // The orders have been combined.

                        from.SendGump(new LargeBODGump(from, this));

                        if (!Complete)
                        {
                            BeginCombine(from);
                        }
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1045159); // That is not a bulk order.
                }
            }
            else
            {
                from.SendLocalizedMessage(1045158); // You must have the item in your backpack to target it.
            }
        }