| | |
| | | }
|
| | | }
|
| | |
|
| | | bool serverInited = false;
|
| | |
|
| | | public event Action selectTalentTypeEvnet;
|
| | | public event Action selectSeriesEvent;
|
| | | public event Action selectSkillEvent;
|
| | |
| | | {
|
| | | talent.level = 0;
|
| | | }
|
| | | serverInited = false;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | serverInited = true;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public int talentResetBook { get; private set; }
|
| | | public int storeId { get; private set; }
|
| | | void ParseConfig()
|
| | | {
|
| | | var configs = Config.Instance.GetAllValues<TalentConfig>();
|
| | |
| | | talentTreeDict.Add(skillConfig.UseType, talentTree);
|
| | | }
|
| | | talentTree.Add(configs[i], skillConfig.SkillTypeID);
|
| | | }
|
| | | }
|
| | | var config = Config.Instance.Get<FuncConfigConfig>("");
|
| | | if (config != null)
|
| | | {
|
| | | talentResetBook = int.Parse(config.Numerical1);
|
| | | }
|
| | | var storeConfigs = Config.Instance.GetAllValues<StoreConfig>();
|
| | | for (int i = 0; i < storeConfigs.Count; i++)
|
| | | {
|
| | | if (storeConfigs[i].ItemID == talentResetBook)
|
| | | {
|
| | | storeId = storeConfigs[i].ID;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var requireSeries = skillConfig.RequireSeries();
|
| | | if (GetSeriesPoint(talentConfig.type, requireSeries) < requireSeriesPoint)
|
| | | {
|
| | | error = 4;
|
| | | error = 3;
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (learnTalent.level < skillConfig.LearnSkillLV)
|
| | | {
|
| | | error = 5;
|
| | | error = 4;
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | public void ProcessLevelUpError(int error)
|
| | | {
|
| | |
|
| | | switch (error)
|
| | | {
|
| | | case 2:
|
| | | break;
|
| | | case 3:
|
| | | break;
|
| | | case 4:
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | #region 服务端数据
|
| | |
| | |
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public void UpdateTalentSkill(int _oldSkillId, int _newSkillId)
|
| | | {
|
| | | var config = Config.Instance.Get<SkillConfig>(_newSkillId);
|
| | | if (talentSkills.ContainsKey(config.SkillTypeID))
|
| | | {
|
| | | var talentSkill = talentSkills[config.SkillTypeID];
|
| | | talentSkill.level = config.SkillLV;
|
| | | if (talentSkillUpdate != null)
|
| | | {
|
| | | talentSkillUpdate(config.SkillTypeID);
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 红点
|