//index=>1低级,2中级,3高级 public static int GetAwakeningItemID(Hotfix_LT.Data.eRoleAttr type, int index) { int baseNum = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetAwakenCurrencyByTypeConfig((int)type); int itemID = baseNum + index; return(itemID); }
public int GetBeralLevel(Hotfix_LT.Data.eRoleAttr role) { int level; DataLookupsCache.Instance.SearchIntByID(string.Format(BreakLevelId, (int)role), out level); return(level); }
public static bool AwakeningIsLock(Hotfix_LT.Data.eRoleAttr type) { //判断当日是否开启 DateTime datetime = TaskSystem.TimeSpanToDateTime(EB.Time.Now); int weeknow = Convert.ToInt32(datetime.DayOfWeek); bool isLock = true; switch (type) { case Hotfix_LT.Data.eRoleAttr.Feng: string goodsStr = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("WindOpenWeek"); string[] tempGoodsStrs = goodsStr.Split(','); isLock = !ContainWeek(tempGoodsStrs, weeknow); break; case Hotfix_LT.Data.eRoleAttr.Huo: string goodsStrH = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("FireOpenWeek"); string[] tempGoodsStrsH = goodsStrH.Split(','); isLock = !ContainWeek(tempGoodsStrsH, weeknow); break; case Hotfix_LT.Data.eRoleAttr.Shui: string goodsStrS = Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("WaterOpenWeek"); string[] tempGoodsStrsS = goodsStrS.Split(','); isLock = !ContainWeek(tempGoodsStrsS, weeknow); break; } return(isLock); }
public string GetType(Hotfix_LT.Data.eRoleAttr attr) { switch (attr) { case Hotfix_LT.Data.eRoleAttr.Feng: return("ID_FENG"); case Hotfix_LT.Data.eRoleAttr.Shui: return("ID_SHUI"); default: return("ID_HUO"); } }
/// <summary> /// 获取对应图鉴的加成属性 /// </summary> /// <param name="handbookId">1,2,3,7,8,9,10,11</param> /// <returns></returns> public float GetHanbookAddtion(Hotfix_LT.Data.eRoleAttr handbookId) { List <HandbookData> handbookDatas = TheHandbookList.Handbooks; for (var i = 0; i < handbookDatas.Count; i++) { HandbookData bookData = handbookDatas[i]; if (bookData.HandbookId == handbookId) { int score = 0;//; bookData.Score; Hotfix_LT.Data.MannualScoreTemplate _scoreTemplate = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetMannualScoreTemplateByScore(score); return(_scoreTemplate.attribute_addition); } } EB.Debug.Log("can not find handbook id : {0}", handbookId); return(0); }
public static int AttrToBGNum(Hotfix_LT.Data.eRoleAttr attr) { switch (attr) { case Hotfix_LT.Data.eRoleAttr.Shui: return(0); case Hotfix_LT.Data.eRoleAttr.Feng: return(1); case Hotfix_LT.Data.eRoleAttr.Huo: return(2); default: EB.Debug.LogError("AttrToLogo error for attr={0}", attr); return(-1); } }
public static string AttrToLevelBG(Hotfix_LT.Data.eRoleAttr attr) { switch (attr) { case Hotfix_LT.Data.eRoleAttr.Feng: return("Ty_Grade_Icon_Feng"); case Hotfix_LT.Data.eRoleAttr.Huo: return("Ty_Grade_Icon_Huo"); case Hotfix_LT.Data.eRoleAttr.Shui: return("Ty_Grade_Icon_Shui"); default: EB.Debug.LogError("AttrToLevelBG error for attr={0}", attr); return("Ty_Grade_Icon_Feng"); } }
public bool IsHandBookCanBreakUp(Hotfix_LT.Data.eRoleAttr attr = Hotfix_LT.Data.eRoleAttr.None) { if (GetHandBookLevel() < UnLockLevel) { return(false); } if (TheHandbookList != null && TheHandbookList.Handbooks != null) { for (var i = 0; i < TheHandbookList.Handbooks.Count; i++) { HandbookData handbook = TheHandbookList.Handbooks[i]; if (attr != Hotfix_LT.Data.eRoleAttr.None && attr != handbook.HandbookId) { continue; } int curLevel = LTPartnerHandbookManager.Instance.GetHandBookLevel(); var curHandBookInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetMannualScoreTemplateById(curLevel); if (curHandBookInfo == null || handbook.BreakLevel >= curHandBookInfo.levelLimit) { continue; } var data = LTPartnerHandbookManager.Instance.TheHandbookList.Find(handbook.HandbookId); Hotfix_LT.Data.MannualBreakTemplate breakThrough = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetBreakTemplateByLevel(data.HandbookId, data.BreakLevel + 1); if (breakThrough != null) { int curCount = GameItemUtil.GetInventoryItemNum(breakThrough.material_1); int nextCount = breakThrough.quantity_1; if (curCount < nextCount) { continue; } return(true); } } } return(false); }
public int GetMaxLayer(Hotfix_LT.Data.eRoleAttr eRoleAttr) { int id = (int)eRoleAttr; int maxLayer = 0; IDictionary temp; if (DataLookupsCache.Instance.SearchDataByID("userAwakenCampaign.campaigns", out temp)) { foreach (DictionaryEntry entry in temp) { string key = (string)entry.Key; if (key.StartsWith(id.ToString())) { if (int.Parse(key) > maxLayer) { maxLayer = int.Parse(key); } } } } return(Reverse(maxLayer)); }
public Hotfix_LT.Data.eRoleAttr JudgeInstanceOpenTime(Hotfix_LT.Data.eRoleAttr type) { return(Hotfix_LT.Data.eRoleAttr.None); }