| | |
| | | public Dictionary<int, Dictionary<int, List<SkillConfig>>> skillActDict { get; private set; }
|
| | | public List<int> betterPassSkills { get; private set; }
|
| | | public bool jumpToPass { get; set; }
|
| | | public int minTaskHole { get; private set; }
|
| | | public int maxTaskHole { get; private set; }
|
| | | public int immediatelyUnlockTask { get; private set; }
|
| | | void ParseConfig()
|
| | | {
|
| | | for (int i = 1; i <= 3; i++)
|
| | |
| | | PassSkillLimit limit = JsonMapper.ToObject<PassSkillLimit>(jsonData[key].ToJson());
|
| | | limit.hole = int.Parse(key);
|
| | | passSkillLimits.Add(limit);
|
| | | if (minTaskHole == 0 && limit.OpenSkillSlots > 0)
|
| | | {
|
| | | minTaskHole = limit.OpenSkillSlots;
|
| | | }
|
| | | if (limit.OpenSkillSlots > maxTaskHole)
|
| | | {
|
| | | maxTaskHole = limit.OpenSkillSlots;
|
| | | }
|
| | | }
|
| | | passEquipCnt = int.Parse(funcCfg.Numerical2);
|
| | | taskHoleDict = ConfigParse.GetDic<int, int>(funcCfg.Numerical4);
|
| | | }
|
| | | funcCfg = Config.Instance.Get<FuncConfigConfig>("PassiveSkillTask");
|
| | | immediatelyUnlockTask = 0;//int.Parse(funcCfg.Numerical2);
|
| | | funcCfg = Config.Instance.Get<FuncConfigConfig>("PassSkillEquipGetWay");
|
| | | if (funcCfg != null)
|
| | | {
|
| | |
| | |
|
| | | public event Action taskUnlockUpdate;
|
| | |
|
| | | public int taskHoleCondition { get; private set; }
|
| | | public uint taskHoleCondition { get; private set; }
|
| | |
|
| | | public const string TASKHOLEKEY = "OpenSkillSlots";
|
| | |
|
| | |
| | | if (task._DicTaskInformation.ContainsKey(1)
|
| | | && task._DicTaskInformation[1].ContainsKey(TASKHOLEKEY))
|
| | | {
|
| | | var value = 0;
|
| | | int.TryParse(task._DicTaskInformation[1][TASKHOLEKEY], out value);
|
| | | return value >= condition;
|
| | | uint value = 0;
|
| | | uint.TryParse(task._DicTaskInformation[1][TASKHOLEKEY], out value);
|
| | | return MathUtility.GetBitValue(value, (ushort)condition);
|
| | | //return value >= condition;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
| | | var dict = _Dic[1];
|
| | | if (dict.ContainsKey(TASKHOLEKEY))
|
| | | {
|
| | | var result = 0;
|
| | | int.TryParse(dict[TASKHOLEKEY], out result);
|
| | | if (result != taskHoleCondition && playerLoginOk)
|
| | | uint result = 0;
|
| | | uint.TryParse(dict[TASKHOLEKEY], out result);
|
| | | if (playerLoginOk)
|
| | | {
|
| | | UnlockPassHole = result;
|
| | | for (int k = minTaskHole; k <= maxTaskHole; k++)
|
| | | {
|
| | | if (!MathUtility.GetBitValue(taskHoleCondition, (ushort)k)
|
| | | && MathUtility.GetBitValue(result, (ushort)k))
|
| | | {
|
| | | UnlockPassHole = k;
|
| | | }
|
| | | }
|
| | | if (taskUnlockUpdate != null)
|
| | | {
|
| | | taskUnlockUpdate();
|
| | |
| | | taskHoleCondition = result;
|
| | | }
|
| | | }
|
| | | UpdateTaskHoleRedpoint();
|
| | | }
|
| | |
|
| | | RolePromoteModel m_PromoteModel;
|
| | |
| | | }
|
| | | playerLoginOk = true;
|
| | | UpdateRedpoint();
|
| | | UpdateTaskHoleRedpoint();
|
| | | }
|
| | |
|
| | | public void CheckEquipPassSkill(PlayerSkillData _skill)
|
| | |
| | | DayRemind.Instance.SetDayRemind(DayRemind.PASS_SKILL_REDPOINT, true);
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public Redpoint taskHoleRedpoint = new Redpoint(10302, 1030299);
|
| | | void UpdateTaskHoleRedpoint()
|
| | | {
|
| | | taskHoleRedpoint.state = RedPointState.None;
|
| | | if (DayRemind.Instance.GetDayRemind(DayRemind.TASK_SKILL_HOLE))
|
| | | {
|
| | | return;
|
| | | }
|
| | | foreach (var hole in taskHoleDict.Keys)
|
| | | {
|
| | | var taskId = taskHoleDict[hole];
|
| | | if (taskId == immediatelyUnlockTask)
|
| | | {
|
| | | var config = Config.Instance.Get<PyTaskConfig>(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV >= config.lv
|
| | | && !IsTaskHoleUnlock(hole))
|
| | | {
|
| | | taskHoleRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetTaskHoleRemind()
|
| | | {
|
| | | DayRemind.Instance.SetDayRemind(DayRemind.TASK_SKILL_HOLE, true);
|
| | | UpdateTaskHoleRedpoint();
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void OnFuncStateChangeEvent(int _id)
|
| | |
| | | if (_id == 109)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | UpdateTaskHoleRedpoint();
|
| | | }
|
| | | }
|
| | | }
|