|
@@ -12,7 +12,7 @@ namespace GFGGame
|
|
|
public class LeagueDataManager : SingletonBase<LeagueDataManager>
|
|
|
{
|
|
|
public int Type = 2;// 1:已经加入军团 2:未加入军团
|
|
|
- public int CurType { get { return Math.Max(GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueSkillMaxType), 1); } }
|
|
|
+ public int MaxFinishType { get { return GetSkillCurType(); } }
|
|
|
public int CurLayer { get { return Math.Max(GameGlobal.myNumericComponent.GetAsInt(NumericType.LeagueSkillMaxLayer), 1); } }
|
|
|
public LeagueData LeagueData;//联盟信息
|
|
|
public int HallLevel { get { return (int)GetNumeriValue(LeagueNumericType.HallLevel); } }
|
|
@@ -117,6 +117,7 @@ namespace GFGGame
|
|
|
int score = 0;
|
|
|
foreach (int key in SkillDataManager.Instance.LeagueSkillScoreDatas.Keys)
|
|
|
{
|
|
|
+
|
|
|
score += SkillDataManager.Instance.LeagueSkillScoreDatas[key][scoreType];
|
|
|
}
|
|
|
return score;
|
|
@@ -126,6 +127,7 @@ namespace GFGGame
|
|
|
{
|
|
|
int score = 0;
|
|
|
if (!SkillDataManager.Instance.LeagueSkillScoreDatas.ContainsKey(skillType)) return score;
|
|
|
+ if (!SkillDataManager.Instance.LeagueSkillScoreDatas[skillType].ContainsKey(scoreType)) return score;
|
|
|
return SkillDataManager.Instance.LeagueSkillScoreDatas[skillType][scoreType];
|
|
|
}
|
|
|
//检测一个技能是否激活
|
|
@@ -134,13 +136,22 @@ namespace GFGGame
|
|
|
if (!SkillDataManager.Instance.LeagueSkillDatas.ContainsKey(skillType)) return false;
|
|
|
return SkillDataManager.Instance.LeagueSkillDatas[skillType].IndexOf(skillId) >= 0;
|
|
|
}
|
|
|
+ private int GetSkillCurType()
|
|
|
+ {
|
|
|
+ LeagueSkillCountCfg[] skillCountCfgs = LeagueSkillCountCfgArray.Instance.dataArray;
|
|
|
+ for (int i = 0; i < skillCountCfgs.Length; i++)
|
|
|
+ {
|
|
|
+ if (GetSkillProgressByType(skillCountCfgs[i].type) < 100) return skillCountCfgs[i].type - 1;
|
|
|
+ }
|
|
|
+ return skillCountCfgs[skillCountCfgs.Length - 1].type;
|
|
|
+ }
|
|
|
|
|
|
//根据技能类型获取该类型进度
|
|
|
public double GetSkillProgressByType(int skillType)
|
|
|
{
|
|
|
LeagueSkillCountCfg skillCountCfg = LeagueSkillCountCfgArray.Instance.GetCfg(skillType);
|
|
|
- if (skillCountCfg.type - CurType < 0) return 100;
|
|
|
- if (skillCountCfg.type - CurType > 0) return 0;
|
|
|
+ // if (skillCountCfg.type - CurType < 0) return 100;
|
|
|
+ // if (skillCountCfg.type - CurType > 0) return 0;
|
|
|
|
|
|
float count = !SkillDataManager.Instance.LeagueSkillDatas.ContainsKey(skillType) ? 0 : SkillDataManager.Instance.LeagueSkillDatas[skillType].Count;
|
|
|
float maxCount = skillCountCfg.skillCount;
|