Ejemplo n.º 1
0
        /// <summary>
        /// does a realm have the amount of keeps required for a certain bonus
        /// </summary>
        /// <param name="type">the type of bonus</param>
        /// <param name="realm">the realm</param>
        /// <returns>true if the realm has the required amount of keeps</returns>
        public static bool RealmHasBonus(eKeepBonusType type, eRealm realm)
        {
            if (!ServerProperties.Properties.USE_LIVE_KEEP_BONUSES)
            {
                return(false);
            }

            if (realm == eRealm.None)
            {
                return(false);
            }

            int count = 0;

            switch (realm)
            {
            case eRealm.Albion: count = albCount; break;

            case eRealm.Midgard: count = midCount; break;

            case eRealm.Hibernia: count = hibCount; break;
            }

            return(count >= (int)type);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// does a realm have the amount of keeps required for a certain bonus
        /// </summary>
        /// <param name="type">the type of bonus</param>
        /// <param name="realm">the realm</param>
        /// <returns>true if the realm has the required amount of keeps</returns>
        public static bool RealmHasBonus(eKeepBonusType type, eRealm realm)
        {
            if (!ServerProperties.Properties.USE_LIVE_KEEP_BONUSES)
                return false;

            if (realm == eRealm.None)
                return false;

            int count = 0;
            switch (realm)
            {
                case eRealm.Albion: count = albCount; break;
                case eRealm.Midgard: count = midCount; break;
                case eRealm.Hibernia: count = hibCount; break;
            }

            return count >= (int)type;
        }