Пример #1
0
 /// <summary>
 /// 是否满足培养条件
 /// </summary>
 /// <param name="user"></param>
 /// <param name="culTure"></param>
 /// <returns></returns>
 public static bool IsMeet(GameUser user, EnchantCulTure culTure)
 {
     if ((culTure.CultureType == EnchantCultureType.Ordinary && user.UserExtend != null && user.UserExtend.MoJingNum >= culTure.MoJingNum)
         || (user.GoldNum >= culTure.GoldNum && culTure.CultureType != EnchantCultureType.Ordinary))
     {
         return true;
     }
     return false;
 }
Пример #2
0
 /// <summary>
 /// 附魔符培养列表
 /// </summary>
 /// <returns></returns>
 public static List<EnchantCulTure> EnchantCultureList()
 {
     List<EnchantCulTure> enchantList = new List<EnchantCulTure>();
     string[] cultureArray = ConfigEnvSet.GetString("Enchant.EnchantCulture").Split(',');
     foreach (var str in cultureArray)
     {
         EnchantCulTure enchantCulTure = new EnchantCulTure();
         string[] strCulture = str.Split('=');
         if (strCulture.Length > 4)
         {
             enchantCulTure.CultureType = strCulture[0].ToEnum<EnchantCultureType>();
             enchantCulTure.GoldNum = strCulture[1].ToInt();
             enchantCulTure.MoJingNum = strCulture[2].ToInt();
             enchantCulTure.UpMature = strCulture[3].ToShort();
             enchantCulTure.SuccessNum = strCulture[4].ToDecimal();
             enchantList.Add(enchantCulTure);
         }
     }
     return enchantList;
 }