public void AddGumpLayout() { AddImage(0, 0, 8000); AddImage(20, 37, 8001); AddImage(20, 107, 8002); AddImage(20, 177, 8001); AddImage(20, 247, 8002); AddImage(20, 317, 8001); AddImage(20, 387, 8002); AddImage(20, 457, 8003); AddHtmlLocalized(125, 40, 345, 16, 1151948, false, false); // Switch Mastery int y = 60; SkillName current = User.Skills.CurrentMastery; foreach (SkillName skName in MasteryInfo.Skills) { Skill sk = User.Skills[skName]; if (sk != null && sk.IsMastery && sk.VolumeLearned > 0) { if (skName != current) { AddButton(30, y, 4005, 4007, (int)skName + 1, GumpButtonType.Reply, 0); } AddHtmlLocalized(75, y, 200, 16, MasteryInfo.GetLocalization(skName), skName == current ? Red : Blue, false, false); AddHtmlLocalized(250, y, 100, 16, 1156052, MasteryInfo.GetMasteryLevel(User, skName).ToString(), 0, false, false); y += 20; } } }
public static int GetMasteryFocusLevel(Mobile from) { if (from.Skills.CurrentMastery == SkillName.Spellweaving) { return(Math.Max(1, MasteryInfo.GetMasteryLevel(from, SkillName.Spellweaving))); } return(0); }
public override void AddGumpLayout() { AddBackground(0, 0, 404, 550, 9380); AddHtmlLocalized(0, 40, 404, 16, CenterLoc, "#1151948", 0, false, false); // Switch Mastery int y = 58; SkillName current = User.Skills.CurrentMastery; foreach (SkillName skName in MasteryInfo.Skills) { Skill sk = User.Skills[skName]; if (sk != null && sk.IsMastery && sk.VolumeLearned > 0) { AddButton(30, y, 4005, 4007, (int)skName + 1, GumpButtonType.Reply, 0); AddHtmlLocalized(72, y, 200, 16, MasteryInfo.GetLocalization(skName), skName == current ? C32216(Red) : C32216(Blue), false, false); AddHtmlLocalized(265, y, 100, 16, 1156052, MasteryInfo.GetMasteryLevel(User, skName).ToString(), 0, false, false); y += 24; } } }
private static int GetStrength(Mobile m) { return(Math.Max(1, MasteryInfo.GetMasteryLevel(m, SkillName.Spellweaving))); }
private static int GetStrength(Mobile m) { return(m.Skills.CurrentMastery == SkillName.Spellweaving ? MasteryInfo.GetMasteryLevel(m, SkillName.Spellweaving) : 1); }