private string HigheffValueReturn(string ID) { if (string.IsNullOrEmpty(ID)) { return(string.Empty); } string result = string.Empty; string[] array = ID.Split(new char[] { ',' }); if (array.Length > 1) { SysSkillHigheffVo dataById = BaseDataMgr.instance.GetDataById <SysSkillHigheffVo>(array[0]); if (array[1].CompareTo("higheff_type") == 0) { result = dataById.higheff_type.Split(new char[] { '|' })[1]; } } return(result); }
public HighEffectData(string higheff_id) { this.higheffId = higheff_id; this.config = BaseDataMgr.instance.GetDataById <SysSkillHigheffVo>(higheff_id); if (this.config == null) { Debug.LogError("Error higheff_id=" + higheff_id); return; } this.Parse(this.config); }
public void ParseTables() { if (!this.isParseTable) { Dictionary <string, object> dicByType = BaseDataMgr.instance.GetDicByType <SysSkillHigheffVo>(); if (dicByType == null) { Debug.LogError("==> SysSkillHigheffVo is NULL !!"); return; } this.isParseTable = true; this._dataVos.Clear(); Dictionary <string, object> .Enumerator enumerator = dicByType.GetEnumerator(); while (enumerator.MoveNext()) { KeyValuePair <string, object> current = enumerator.Current; string key = current.Key; KeyValuePair <string, object> current2 = enumerator.Current; SysSkillHigheffVo higheff_vo = current2.Value as SysSkillHigheffVo; HighEffectData value = new HighEffectData(key, higheff_vo); this._dataVos.Add(key, value); } } }
private void Parse(SysSkillHigheffVo higheff_vo) { if (StringUtils.CheckValid(higheff_vo.target_type)) { int[] stringToInt = StringUtils.GetStringToInt(higheff_vo.target_type, '|'); this.targetCamp = (SkillTargetCamp)((stringToInt == null) ? 0 : stringToInt[0]); this.targetTag = (TargetTag)((stringToInt.Length <= 1) ? 0 : stringToInt[1]); } if (StringUtils.CheckValid(higheff_vo.effective_range)) { float[] stringToFloat = StringUtils.GetStringToFloat(higheff_vo.effective_range, '|'); this.rangeRadius = ((stringToFloat == null) ? 0f : stringToFloat[0]); this.maxNum = ((stringToFloat.Length <= 1) ? 2147483647 : ((int)stringToFloat[1])); this.higheffTrigerCount = ((stringToFloat.Length <= 2) ? 2147483647 : ((int)stringToFloat[2])); } if (StringUtils.CheckValid(higheff_vo.higheff_type)) { string[] stringValue = StringUtils.GetStringValue(higheff_vo.higheff_type, '|'); this.higheffType = (HighEffType)int.Parse(stringValue[0]); this.SetHighEffParam(this.higheffType, stringValue); } if (StringUtils.CheckValid(higheff_vo.cd_time)) { string[] stringValue2 = StringUtils.GetStringValue(higheff_vo.cd_time, ','); this.cdTime = ((stringValue2.Length <= 0) ? 0f : float.Parse(stringValue2[0])); this.delayTime = ((stringValue2.Length <= 1) ? 0f : float.Parse(stringValue2[1])); } if (StringUtils.CheckValid(higheff_vo.perform_id)) { this.performIds = StringUtils.GetStringValue(higheff_vo.perform_id, ','); } if (StringUtils.CheckValid(higheff_vo.attach_higheff)) { this.attachHighEffs = StringUtils.GetStringValue(higheff_vo.attach_higheff, ','); } if (StringUtils.CheckValid(higheff_vo.attach_buff)) { this.attachBuffs = StringUtils.GetStringValue(higheff_vo.attach_buff, ','); } if (StringUtils.CheckValid(higheff_vo.attach_self_higheff)) { this.attachSelfHighEffs = StringUtils.GetStringValue(higheff_vo.attach_self_higheff, ','); } this.isAutoDestroy = (higheff_vo.isAutoDestroy != 0); if (StringUtils.CheckValid(higheff_vo.damage_id)) { this.damage_ids = StringUtils.GetStringToInt(higheff_vo.damage_id, ','); } if (StringUtils.CheckValid(higheff_vo.effectGain)) { string[] stringValue3 = StringUtils.GetStringValue(higheff_vo.effectGain, '|'); if (stringValue3.Length > 0) { this.DataType.MagicType = (EffectMagicType)int.Parse(stringValue3[0]); } if (stringValue3.Length > 1) { this.DataType.GainType = (EffectGainType)int.Parse(stringValue3[1]); } if (stringValue3.Length > 2) { this.DataType.ImmuneType = (EffectImmuneType)int.Parse(stringValue3[2]); } } }
public HighEffectData(string higheff_id, SysSkillHigheffVo higheff_vo) { this.higheffId = higheff_id; this.config = higheff_vo; this.Parse(this.config); }