public void SetSkillDamageCharaData(ref CharacterData characterData, SkillNode skillNode, CharacterState attackerCs) { characterData = attackerCs.CharData.Clone(); characterData.state = attackerCs.state; characterData.groupIndex = attackerCs.groupIndex; if (skillNode.add_state != null) { characterData.skill_Damage = new float[skillNode.add_state.Length + 1]; characterData.skill_Damage [0] = skillNode.GetSkillBattleValue(0, attackerCs.CharData); for (int i = 0; i < skillNode.add_state.Length; i++) { object o = skillNode.add_state[i]; if (o != null && o is System.Array && ((System.Array)o).Length > 0) { characterData.skill_Damage [i + 1] = skillNode.GetSkillBattleValue(i + 1, attackerCs.CharData); } } } }