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); }
public override bool RenderObjective(MondainQuestGump gump, bool offer) { int offset = 163; int page = 1; var slay = Objectives.FirstOrDefault(o => o is SlayObjective) as SlayObjective; if (offer) { gump.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer } else { gump.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log } gump.AddHtmlObject(160, 70, 200, 40, Title, BaseQuestGump.DarkGreen, false, false); gump.AddPage(page); gump.AddButton(130, 430, 0x2EEF, 0x2EF1, 0, GumpButtonType.Page, page - 1); gump.AddHtmlLocalized(98, 147, 312, 16, 1072208, 0x2710, false, false); // All of the following gump.AddHtmlLocalized(98, offset, 30, 16, 1072204, 0x15F90, false, false); // Slay gump.AddLabel(133, offset, 0x481, "10 " + slay.Name); // %count% + %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; } offset += 75; for (int i = 1; i < Objectives.Count; i++) { gump.AddHtmlLocalized(98, offset, 305, 16, 1150933 + (i - 1), 0x15F90, false, false); if (offset + 80 > 335) { offset = 163; gump.AddButton(275, 430, 0x2EE9, 0x2EEB, 0, GumpButtonType.Page, page + 1); gump.AddPage(++page); gump.AddButton(130, 430, 0x2EEF, 0x2EF1, 0, GumpButtonType.Page, page - 1); if (i == Objectives.Count - 1) { RenderRewardPage(gump, offer); break; } } // render rewards page else if (i == Objectives.Count - 1) { gump.AddButton(275, 430, 0x2EE9, 0x2EEB, 0, GumpButtonType.Page, page + 1); gump.AddPage(++page); RenderRewardPage(gump, offer); gump.AddButton(130, 430, 0x2EEF, 0x2EF1, 0, GumpButtonType.Page, page - 1); break; } else { offset += 80; } } return(true); }