protected override void Compile() { if (Profile == null) { Profile = PvPTemplates.FetchProfile(User); } base.Compile(); }
public TemplateManagerGump(PlayerMobile user, Gump parent = null, TemplateProfile profile = null) : base(user, parent, null, 100, emptyText: "No Templates to Display.", title: "Template Manager") { Profile = profile ?? PvPTemplates.FetchProfile(user); EntriesPerPage = 2; Modal = true; ForceRecompile = true; }
public ManageTemplateGump(PlayerMobile user, Gump parent = null, TemplateProfile profile = null, Template edit = null) : base(user, parent, null, null, null, null, 7020) { Profile = profile ?? PvPTemplates.FetchProfile(user); Modal = true; ForceRecompile = true; if (LockMode) { return; } if (edit == null || !Profile.Contains(edit)) { Title = "Create Template"; TemplateName = "New Template"; TemplateNotes = "Description/Notes"; TemplateSkills = new SkillName[0]; TemplateStr = TemplateDex = TemplateInt = 0; } else { Title = "Edit Template"; Template = edit; TemplateName = Template.Name; TemplateNotes = Template.Notes; TemplateSkills = Template.GetActiveSkills().ToArray(); TemplateStr = Template.Stats[StatType.Str]; TemplateDex = Template.Stats[StatType.Dex]; TemplateInt = Template.Stats[StatType.Int]; } }