/// <summary> /// 获取设置状态 /// </summary> public static void SetSkillStatus(ref List <SkillStatusInfo> lstatus, string strStatus) { if (lstatus == null) { lstatus = new List <SkillStatusInfo>(); } if (string.IsNullOrEmpty(strStatus) == true || strStatus == "0") { return; } int length = NdUtil.GetLength(strStatus); for (int i = 0; i < length; ++i) { int statusid = NdUtil.GetIntValue(strStatus, i); s_statusInfo stainfo = GetSkillStatus(statusid); if (stainfo != null) { SkillStatusInfo ss = new SkillStatusInfo(); if (SetSkillStatus(stainfo, ref ss) == true) { lstatus.Add(ss); } } } }
/// <summary> /// 设置状态 /// </summary> private static bool SetSkillStatus(s_statusInfo stainfo, ref SkillStatusInfo Info) { if (stainfo == null || Info == null) { return(false); } Info.m_persistence = stainfo.persistence; Info.m_id = stainfo.id; Info.m_name = stainfo.name; Info.m_type = stainfo.type; if (string.IsNullOrEmpty(stainfo.effect) == false && stainfo.effect != "0") { int length = NdUtil.GetLength(stainfo.effect); for (int i = 0; i < length; ++i) { Info.m_effect.Add(NdUtil.GetIntValue(stainfo.effect, i)); } } Info.m_effectlevel = stainfo.effectlevel; Info.m_time = stainfo.time; Info.m_timeinterval = stainfo.timeinterval; Info.m_effectid = stainfo.effectid; Info.m_condition = stainfo.condition; Info.m_position = stainfo.position; Info.m_data0 = stainfo.data0; Info.m_data1 = stainfo.data1; Info.m_skill1type = stainfo.skill1type; Info.m_level1 = stainfo.level1; Info.m_skill2type = stainfo.skill2type; Info.m_level2 = stainfo.level2; Info.m_bufftype = stainfo.bufftype; s_statusreplaceInfo replace = GetSkillStatusReplace(Info.m_type, Info.m_effect.Count > 0 ? Info.m_effect[0] : 0, Info.m_bufftype); if (replace != null) { Info.m_RelpaceInfo = new SkillStatusReplaceInfo(); Info.m_RelpaceInfo.m_id = replace.id; Info.m_RelpaceInfo.m_statustype = replace.statustype; Info.m_RelpaceInfo.m_effect = replace.effect; Info.m_RelpaceInfo.m_name = replace.name; Info.m_RelpaceInfo.m_type = replace.type; Info.m_RelpaceInfo.m_compatible = replace.compatible; Info.m_RelpaceInfo.m_reppriority = replace.reppriority; Info.m_RelpaceInfo.m_spepriority = replace.spepriority; Info.m_RelpaceInfo.m_bufftype = replace.bufftype; Info.m_RelpaceInfo.m_isaction = replace.isaction; } else { Debug.Log("xxxx " + Info.m_name); } return(true); }
/// <summary> /// 获取湿身状态数据 /// </summary> public static SkillStatusInfo GetWetBodyStatusInfo() { s_statusInfo stainfo = GetSkillStatus(999999); if (stainfo != null) { SkillStatusInfo Info = new SkillStatusInfo(); if (SetSkillStatus(stainfo, ref Info) == true) { return(Info); } } return(null); }