public void NewUnit(string unitName, string raceName, string cardinalName, DictPerkBoolDict perkDict, int level) { PartyEntry entry = Dequeue(); if (entry.UnitInfo != null) { entry.UnitInfo = new string[] { unitName, raceName, cardinalName, level.ToString() }; foreach (var key in perkDict.ToList()) { entry.PerkDict.Add(key.Key, key.Value); } partyEntries.Add(entry); } else { Enqueue(entry); } }
private void ResetPerkTree() { int unitPerks = 0; for (int i = 0; i < perkVertices.Length; ++i) { perkVertices[i].perkName = null; perkVertices[i].description = null; perkVertices[i].IsLearned = false; } foreach (var key in unitPerkDict.ToList()) { if (unitPerkDict[key.Key] == true) { unitPerks++; } unitPerkDict[key.Key] = false; } partyBuilder.DemoPerkCount -= unitPerks; }