示例#1
0
        /// <summary>
        /// Returns the x-coordinate for how far we should fill the xp bar based on the user's
        /// required exp to level up.
        /// </summary>
        /// <returns></returns>
        private static float GetGuildXpBarFillCoordinate(User user, Server server, TemplateXpBar bar)
        {
            double percentToNextLevel = user.PercentToNextServerLevel(server);

            if (percentToNextLevel < 1)
            {
                return((float)((percentToNextLevel * bar.Length) + bar.LocA.X) + 5);
            }

            return((float)((percentToNextLevel * bar.Length) + bar.LocA.X));
        }
示例#2
0
        /// <summary>
        /// Returns the x-coordinate for how far we should fill the xp bar based on the user's
        /// required exp to level up.
        /// </summary>
        /// <returns></returns>
        private static float GetGlobalXpBarFillCoordinate(User user, TemplateXpBar bar)
        {
            double percentToNextLevel = user.PercentToNextLevel();

            return((float)((percentToNextLevel * bar.Length) + bar.LocA.X));
        }