public SkillLearn GetCopy() { SkillLearn s = new SkillLearn(); s.atLevel = this.atLevel; s.skillID = this.skillID; s.skillLevel = this.skillLevel; s.useLevel = this.useLevel; return s; }
public static SkillLearn[] Add(SkillLearn n, SkillLearn[] list) { ArrayList tmp = new ArrayList(); foreach(SkillLearn str in list) tmp.Add(str); tmp.Add(n); return tmp.ToArray(typeof(SkillLearn)) as SkillLearn[]; }
public SkillLearn[] GetSkillsByType(int index) { SkillLearn[] sk = new SkillLearn[0]; SkillLearn[] s = this.GetSkills(); for(int i=0; i<s.Length; i++) { if(DataHolder.Skill(s[i].skillID).skilltype == index) { sk = ArrayHelper.Add(s[i].GetCopy(), sk); } } return sk; }
public static SkillLearn[] Remove(int index, SkillLearn[] list) { ArrayList tmp = new ArrayList(); foreach(SkillLearn str in list) tmp.Add(str); tmp.RemoveAt(index); return tmp.ToArray(typeof(SkillLearn)) as SkillLearn[]; }