public virtual void OnProgress(PlayerMobile pm, AchievementProfile profile) { int progress = profile.GetProgress(this); int maxProgress = profile.GetMaxProgress(this); if (profile.ShowProgress || progress == 1 || (maxProgress > 50 && progress % 10 == 0)) { SendProgressionMessage(pm, progress, maxProgress); SendTag(pm); } RefreshGumps(pm); }
private void BuildProgressBar(AchievementProfile profile, Achievement achievement) { AddImage(167, 61, 2053); int progress = profile.GetProgress(achievement); int maxProgress = achievement.MaxProgress; if (progress > 0 && maxProgress > 1) { int length = Math.Max(5, (int)(109.0 * (double)((double)progress / (double)maxProgress))); if (length > 0) { AddImageTiled(167, 61, Math.Min(109, length), 11, 2056); AddLabel(283, 58, AchievementGump.GetColor(progress, maxProgress), String.Format("{0}%", (((double)progress / (double)maxProgress) * 100).ToString("0.0"))); } } }