Exemplo n.º 1
0
        public int GetAchievementScore()
        {
            var Result = 0;

            foreach (var AchievementProgress in StorageHandler.GetCharacterAchievements(Id))
            {
                var Achievement = AchievementHandler.GetAchievement(AchievementProgress.Id);

                Result += (AchievementProgress.CurrentLevel * Achievement.ScorePerLevel);
            }

            return(Result);
        }
Exemplo n.º 2
0
        public void RefreshAchievement(int AchievementId)
        {
            var Achievement = AchievementHandler.GetAchievement(AchievementId);

            if (Achievement == null)
            {
                return;
            }

            if (Rank < Achievement.RankRequired)
            {
                return;
            }

            MessageHandler.HandleComposer(GetSession(), new AchievementComposer(), Achievement, this);
        }