Example #1
0
        public override bool RenderObjective(MondainQuestGump gump, bool offer)
        {
            int offset = 172;

            BaseObjective first = null;

            for (var index = 0; index < Objectives.Count; index++)
            {
                var o = Objectives[index];

                if (o is SlayObjective)
                {
                    first = o;
                    break;
                }
            }

            SlayObjective slay = first as SlayObjective;

            for (int i = 0; i < Objectives.Count - 1; i++)
            {
                if (i != 0 && i % 3 == 0)
                {
                    gump.SecObjectivesButtons();
                    offset = 172;
                }

                if (i == 0)
                {
                    gump.AddHtmlLocalized(98, offset, 312, 16, 1072204, 0x15F90, false, false); // Slay

                    if (slay != null)
                    {
                        gump.AddLabel(133, offset, 0x481, slay.MaxProgress.ToString()); // Count
                        gump.AddLabel(163, offset, 0x481, slay.Name);                   // Name

                        offset += 16;

                        if (!offer)
                        {
                            gump.AddHtmlLocalized(103, offset, 120, 16, 3000087, 0x15F90, false, false); // Total
                            gump.AddLabel(223, offset, 0x481, slay.CurProgress.ToString());              // %current progress%

                            offset += 16;
                        }
                    }
                }

                gump.AddHtmlLocalized(98, offset, 312, 80, 1150933 + i, 0x15F90, false, false);
                offset += 80;
            }

            return(true);
        }