private bool RefreshSkillTypeExistTimeOffsets(talent_template dataTT) { if (dataTT.type != 6) { return(false); } string[] array = dataTT.ruleDetail.Split(new char[] { ',' }); if (array.Length < 2) { return(true); } int num = int.Parse(array[0]); string text = array[1].Substring(0, 1); string text2 = array[1].Substring(1, array[1].get_Length() - 1); if (!this.SkillTypeExistTimeOffsets.ContainsKey(num)) { this.SkillTypeExistTimeOffsets.set_Item(num, 0); } if (text == "-") { this.SkillTypeExistTimeOffsets.set_Item(num, this.SkillTypeExistTimeOffsets.get_Item(num) - int.Parse(text2)); } else { this.SkillTypeExistTimeOffsets.set_Item(num, this.SkillTypeExistTimeOffsets.get_Item(num) + int.Parse(text2)); } return(true); }
private bool RefreshInitActPoint(talent_template dataTT) { if (dataTT.type == 1) { int key = int.Parse(GameDataUtils.SplitString4Dot0(dataTT.ruleDetail)); Attrs attrs = DataReader <Attrs> .Get(key); if (attrs == null) { return(true); } for (int i = 0; i < attrs.attrs.get_Count(); i++) { if (attrs.attrs.get_Item(i) == 106) { if (i < attrs.values.get_Count()) { this.InitActPoint += attrs.values.get_Item(i); } return(true); } } } return(false); }
private bool RefreshSkillTypeActPointOffsets(talent_template dataTT) { if (dataTT.type != 5) { return(false); } string[] array = dataTT.ruleDetail.Split(new char[] { ',' }); if (array.Length < 2) { return(true); } int skillType = int.Parse(array[0]); string text = array[1].Substring(0, 1); string text2 = array[1].Substring(1, array[1].get_Length() - 1); BattleSkillExtend battleSkillExtend = this.GetBattleSkillExtend(skillType); if (battleSkillExtend == null) { battleSkillExtend = new BattleSkillExtend(); battleSkillExtend.skillType = skillType; this.BattleSkillExtends.Add(battleSkillExtend); } if (text == "-") { battleSkillExtend.actPointOffset -= int.Parse(text2); } else { battleSkillExtend.actPointOffset += int.Parse(text2); } return(true); }
private bool RefreshPassiveSkillIDs(talent_template dataTT) { if (dataTT.type == 10) { int skillId = (int)float.Parse(dataTT.ruleDetail); if (this.GetBattleSkillInfo(skillId) == null) { BattleSkillInfo battleSkillInfo = new BattleSkillInfo(); battleSkillInfo.skillId = skillId; battleSkillInfo.skillIdx = 0; battleSkillInfo.skillLv = 1; this.BattleSkillInfos.Add(battleSkillInfo); } return(true); } return(false); }
private void RefreshTalentTemplates() { this.ResetTalentTemplatesData(); for (int i = 0; i < this.RoleTalentInfos.get_Count(); i++) { RoleTalentInfo roleTalentInfo = this.RoleTalentInfos.get_Item(i); Talent data = this.GetData(roleTalentInfo.cfgId, roleTalentInfo.lv); if (data != null) { if (data.templateId > 0) { talent_template talent_template = DataReader <talent_template> .Get(data.templateId); if (talent_template == null) { Debug.LogError("GameData.talent_template no exist, id = " + data.templateId); } else if (!this.RefreshInitActPoint(talent_template)) { if (!this.RefreshSkillTypeCDOffsets(talent_template)) { if (!this.RefreshSkillTypeActPointOffsets(talent_template)) { if (!this.RefreshSkillTypeExistTimeOffsets(talent_template)) { if (this.RefreshPassiveSkillIDs(talent_template)) { } } } } } } } } }