public int GetAllPoint(JingJieType type) { int count = 0; if (mTotalPoint.TryGetValue(type, out count)) { return(count); } return(0); }
private void RefreshData() { mUsedPoint.Clear(); mTotalPoint.Clear(); for (int i = 0; i < (int)JingJieType.MAX; i++) { mUsedPoint.Add((JingJieType)i, 0); mTotalPoint.Add((JingJieType)i, 0); } foreach (var data in mData) { LuaTable t = ConfigManager.Instance.Jingjie.GetNodeConfig(data.Key); if (t != null) { JingJieType type = (JingJieType)t.Get <int>("nodeType"); int count = 0; if (mUsedPoint.TryGetValue(type, out count)) { count += data.Value; } mUsedPoint[type] = count; } } int lv = PlayerData.Instance.BaseAttr.JingJieLevel; for (int i = 0; i <= lv; i++) { LuaTable t = ConfigManager.Instance.Jingjie.GetLevelConfig(i); if (t != null) { JingJieType type = (JingJieType)t.Get <int>("nodeType"); int count = 0; if (mTotalPoint.TryGetValue(type, out count)) { count += t.Get <int>("point"); } mTotalPoint[type] = count; } } }
public void SendResetPoint(JingJieType type) { NetLogicGame.Instance.SendReqDianfengReset((int)type); }