public void AddPoint() { if (Points < 1) { if (myParent.CheckTotalPoints() + 1 <= myParent.PointsCap) { if (Unlocked) { if (Points + 1 <= MaxPoints) { Points++; myParent.CheckTalents(); } } } } else { if ((myParent.CheckTotalPoints() >= 13) && (myParent.CheckTotalPoints() + 1 <= myParent.PointsCap)) { if (Points + 1 <= MaxPoints) { Points++; myParent.CheckTalents(); } } } }
public void LoadAccData() { if (File.Exists("AccData.dat")) { string _content = File.ReadAllText("AccData.dat"); string[] _records = _content.Split('|'); level = int.Parse(_records[0]); experience = int.Parse(_records[1]); maxExperience = int.Parse(_records[2]); basestatINT = int.Parse(_records[3]); basestatKNG = int.Parse(_records[4]); basestatWSD = int.Parse(_records[5]); basestatFCS = int.Parse(_records[6]); basestatPWR = int.Parse(_records[7]); myTalentTree = GetTalentTreeFromCode(_records[8]); myTalentTree.PointsCap = level - 1; if (myTalentTree.CheckTotalPoints() > myTalentTree.PointsCap) { myTalentTree.Reset(); } Debug.Log("Account Loaded"); } LoadTemplates(); myTalentTree = GetTemplate(CHAMPION.PALADIN); }