public static SkillUnit.SkillJump ConvertSkillJump(SkillJump unit) { SkillUnit.SkillJump oUnit = new SkillUnit.SkillJump(); oUnit.id = unit.id; oUnit.height = unit.height; oUnit.speed = unit.speed; oUnit.moveTime = unit.moveTime; oUnit.maxInfluence = unit.maxInfluence; oUnit.jumpType = (SkillUnit.SkillJump.JumpType)(int) unit.jumpType; oUnit.hitArea = ConvertSkillShape(unit.hitArea); 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); } } }