Ejemplo n.º 1
0
        /// <summary>Checks if the given criteria is completable</summary>
        /// <param name="achievementCriteriaEntry"></param>
        /// <returns></returns>
        public bool IsCriteriaCompletable(AchievementCriteriaEntry achievementCriteriaEntry)
        {
            if (achievementCriteriaEntry.AchievementEntry.Flags.HasFlag((Enum)AchievementFlags.Counter))
            {
                return(false);
            }
            AchievementProgressRecord criteriaProgress =
                this.m_owner.Achievements.GetAchievementCriteriaProgress(achievementCriteriaEntry
                                                                         .AchievementCriteriaId);

            if (criteriaProgress == null)
            {
                return(false);
            }
            return(achievementCriteriaEntry.IsAchieved(criteriaProgress));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Checks if the given criteria is completable
        /// </summary>
        /// <param name="achievementCriteriaEntry"></param>
        /// <returns></returns>
        public bool IsCriteriaCompletable(AchievementCriteriaEntry achievementCriteriaEntry)
        {
            AchievementEntry achievementEntry = achievementCriteriaEntry.AchievementEntry;

            // Counter achievement were never meant to be completed.
            if (achievementEntry.Flags.HasFlag(AchievementFlags.Counter))
            {
                return(false);
            }

            //TODO: Add support for realm first.

            // We never completed the criteria befoer.
            AchievementProgressRecord achievementProgressRecord =
                m_owner.Achievements.GetAchievementCriteriaProgress(achievementCriteriaEntry.AchievementCriteriaId);

            if (achievementProgressRecord == null)
            {
                return(false);
            }
            return(achievementCriteriaEntry.IsAchieved(achievementProgressRecord));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Checks if the given criteria is completable
        /// </summary>
        /// <param name="achievementCriteriaEntry"></param>
        /// <returns></returns>
        public bool IsCriteriaCompletable(AchievementCriteriaEntry achievementCriteriaEntry)
        {
            AchievementEntry achievementEntry = achievementCriteriaEntry.AchievementEntry;

            // Counter achievement were never meant to be completed.
            if (achievementEntry.Flags.HasFlag(AchievementFlags.Counter))
                return false;

            //TODO: Add support for realm first.

            // We never completed the criteria befoer.
            AchievementProgressRecord achievementProgressRecord =
                m_owner.Achievements.GetAchievementCriteriaProgress(achievementCriteriaEntry.AchievementCriteriaId);
            if (achievementProgressRecord == null)
                return false;
            return achievementCriteriaEntry.IsAchieved(achievementProgressRecord);
        }