public static SkillUnit.SkillAreaRand ConvertSkillAreaRand(SkillAreaRand unit) { SkillUnit.SkillAreaRand oUnit = new SkillUnit.SkillAreaRand(); oUnit.id = unit.id; oUnit.referPoint = (SkillUnit.SkillUnit.ReferPoint)(int) unit.referPoint; oUnit.basePoint = (SkillUnit.SkillUnit.BasePoint)(int) unit.basePoint; oUnit.unitID = unit.unitID; oUnit.unitCount = unit.unitCount; oUnit.area = ConvertSkillShape(unit.area); return(oUnit); }
public static void ConvertSkillUnit(SkillUnit.SkillUnit oUnit, JSkillUnit unit) { oUnit.id = unit.id; oUnit.artId = unit.artId; oUnit.launchType = (SkillUnit.SkillUnit.LaunchType)(int) unit.launchType; oUnit.targetType = (SkillUnit.SkillUnit.TargetType)(int) unit.targetType; oUnit.skillTime = unit.skillTime; oUnit.cd = unit.cd; oUnit.distance = unit.distance; oUnit.referId = unit.referId; oUnit.guidePolicy = ConvertSkillGuidePolicy(unit.guidePolicy); if (oUnit.launchType == SkillUnit.SkillUnit.LaunchType.SINGLELINE) { if (unit.referId < EditorDataContainer.allSkillUnits.singeLines.Count && unit.referId >= 0) { SkillUnit.SkillLine line = EditorDataContainer.allSkillUnits.singeLines[unit.referId]; line = ConvertSkillLine((SkillLine)unit.skillObj); } } if (oUnit.launchType == SkillUnit.SkillUnit.LaunchType.MULLINE) { if (unit.referId < EditorDataContainer.allSkillUnits.multLines.Count && unit.referId >= 0) { SkillUnit.SkillMultiLine line = EditorDataContainer.allSkillUnits.multLines[unit.referId]; line = ConvertSkillMultiLine((SkillMultiLine)unit.skillObj); } } if (oUnit.launchType == SkillUnit.SkillUnit.LaunchType.AREA) { if (unit.referId < EditorDataContainer.allSkillUnits.areas.Count && unit.referId >= 0) { SkillUnit.SkillArea line = EditorDataContainer.allSkillUnits.areas[unit.referId]; line = ConvertSkillArea((SkillArea)unit.skillObj); } } if (oUnit.launchType == SkillUnit.SkillUnit.LaunchType.JUMP) { if (unit.referId < EditorDataContainer.allSkillUnits.jumps.Count && unit.referId >= 0) { SkillUnit.SkillJump line = EditorDataContainer.allSkillUnits.jumps[unit.referId]; line = ConvertSkillJump((SkillJump)unit.skillObj); } } if (oUnit.launchType == SkillUnit.SkillUnit.LaunchType.AREA_RANDSKILL) { if (unit.referId < EditorDataContainer.allSkillUnits.areaRands.Count && unit.referId >= 0) { SkillUnit.SkillAreaRand line = EditorDataContainer.allSkillUnits.areaRands[unit.referId]; line = ConvertSkillAreaRand((SkillAreaRand)unit.skillObj); } } if (oUnit.launchType == SkillUnit.SkillUnit.LaunchType.HELIX) { if (unit.referId < EditorDataContainer.allSkillUnits.helixes.Count && unit.referId >= 0) { SkillUnit.SkillHelix line = EditorDataContainer.allSkillUnits.helixes[unit.referId]; line = ConvertSkillHelix((SkillHelix)unit.skillObj); } } if (oUnit.launchType == SkillUnit.SkillUnit.LaunchType.FOLLOW) { if (unit.referId < EditorDataContainer.allSkillUnits.follows.Count && unit.referId >= 0) { SkillUnit.SkillFollow line = EditorDataContainer.allSkillUnits.follows[unit.referId]; line = ConvertSkillFollow((SkillFollow)unit.skillObj); } } if (oUnit.launchType == SkillUnit.SkillUnit.LaunchType.BACK_STAB) { if (unit.referId < EditorDataContainer.allSkillUnits.backStabs.Count && unit.referId >= 0) { SkillUnit.SkillBackStab line = EditorDataContainer.allSkillUnits.backStabs[unit.referId]; line = ConvertSkillBackStab((SkillBackStab)unit.skillObj); } } }