public JobDataState Copy() { JobDataState state = new JobDataState(); string[] keys = JobPoints.Keys.ToArray(); string[] jobAndRaceKey = TalentsLearned.Keys.ToArray(); foreach (string k in keys) { state.JobPoints[k] = JobPoints[k]; } state.AddJobKeys(jobAndRaceKey.ToList()); foreach (string k in jobAndRaceKey) { foreach (string talent in TalentsLearned[k]) { state.LearnSkill(k, talent); } } return(state); }
public void LearnTalent(string jobKey, Talent talent) { JobDataState.LearnSkill(jobKey, talent.GetKey()); if (talent.HasPassive()) { LearnPassiveBuff(talent.PassiveBuff); } if (talent.HasLearnAnotherSkill()) { talent.jobeEffect.OnApply(this, null); } }