public static int getNeedExp(int Exp, int level) { StrengThenExpInfo strengThenExpInfo = StrengthenMgr.FindStrengthenExpInfo(level + 1); if (strengThenExpInfo == null) { return(0); } return(strengThenExpInfo.Exp - Exp); }
private static bool LoadStrengthen(Dictionary <int, StrengthenInfo> strengthen, Dictionary <int, StrengthenInfo> RefineryStrengthen, Dictionary <int, StrengThenExpInfo> StrengthenExp, Dictionary <int, StrengthenGoodsInfo> StrengthensGoods) { using (ProduceBussiness produceBussiness = new ProduceBussiness()) { StrengthenInfo[] allStrengthen = produceBussiness.GetAllStrengthen(); StrengthenInfo[] allRefineryStrengthen = produceBussiness.GetAllRefineryStrengthen(); StrengThenExpInfo[] allStrengThenExp = produceBussiness.GetAllStrengThenExp(); StrengthenGoodsInfo[] allStrengthenGoodsInfo = produceBussiness.GetAllStrengthenGoodsInfo(); StrengthenInfo[] array = allStrengthen; for (int i = 0; i < array.Length; i++) { StrengthenInfo strengthenInfo = array[i]; if (!strengthen.ContainsKey(strengthenInfo.StrengthenLevel)) { strengthen.Add(strengthenInfo.StrengthenLevel, strengthenInfo); } } StrengthenInfo[] array2 = allRefineryStrengthen; for (int j = 0; j < array2.Length; j++) { StrengthenInfo strengthenInfo2 = array2[j]; if (!RefineryStrengthen.ContainsKey(strengthenInfo2.StrengthenLevel)) { RefineryStrengthen.Add(strengthenInfo2.StrengthenLevel, strengthenInfo2); } } StrengThenExpInfo[] array3 = allStrengThenExp; for (int k = 0; k < array3.Length; k++) { StrengThenExpInfo strengThenExpInfo = array3[k]; if (!StrengthenExp.ContainsKey(strengThenExpInfo.Lv)) { StrengthenExp.Add(strengThenExpInfo.Lv, strengThenExpInfo); } } StrengthenGoodsInfo[] array4 = allStrengthenGoodsInfo; for (int l = 0; l < array4.Length; l++) { StrengthenGoodsInfo strengthenGoodsInfo = array4[l]; if (!StrengthensGoods.ContainsKey(strengthenGoodsInfo.ID)) { StrengthensGoods.Add(strengthenGoodsInfo.ID, strengthenGoodsInfo); } } } return(true); }
public static bool canUpLv(int exp, int level) { StrengThenExpInfo strengThenExpInfo = StrengthenMgr.FindStrengthenExpInfo(level + 1); return(strengThenExpInfo != null && exp >= strengThenExpInfo.Exp); }