private void RefreshTalents(Action finishCallback) { Dictionary <int, List <int> > zoneToTalent = RoleTalentManager.Instance.ZoneToTalent; int num = zoneToTalent.get_Count(); int num2 = 0; using (Dictionary <int, List <int> > .KeyCollection.Enumerator enumerator = zoneToTalent.get_Keys().GetEnumerator()) { while (enumerator.MoveNext()) { int current = enumerator.get_Current(); if (num2 < this.listLevelZone.get_Count()) { TalentLevelZone talentLevelZone = this.listLevelZone.get_Item(num2); talentLevelZone.RefreshTalents(zoneToTalent.get_Item(current), delegate { num--; if (num <= 0 && finishCallback != null) { finishCallback.Invoke(); } }); talentLevelZone.SetLevel(current); num2++; } } } }
public void TalentReset() { this.AddSpineOfReset(); for (int i = 0; i < this.listLevelZone.get_Count(); i++) { TalentLevelZone talentLevelZone = this.listLevelZone.get_Item(i); for (int j = 0; j < talentLevelZone.listItems.get_Count(); j++) { talentLevelZone.listItems.get_Item(j).AddSpineOfReset(); } } }
private RoleTalentItem GetTalent(int talentId) { for (int i = 0; i < this.listLevelZone.get_Count(); i++) { TalentLevelZone talentLevelZone = this.listLevelZone.get_Item(i); for (int j = 0; j < talentLevelZone.listItems.get_Count(); j++) { if (talentLevelZone.listItems.get_Item(j).m_id == talentId) { return(talentLevelZone.listItems.get_Item(j)); } } } return(null); }
public void RefreshLevelZones() { int num = RoleTalentManager.Instance.ZoneToTalent.get_Count(); this.listLevelZone.Clear(); this.m_levelZonePool.Create(num, delegate(int index) { if (index < num && index < this.m_levelZonePool.Items.get_Count()) { TalentLevelZone component = this.m_levelZonePool.Items.get_Item(index).GetComponent <TalentLevelZone>(); component.m_row = index; this.listLevelZone.Add(component); } if (index == num - 1) { this.RefreshTalents(delegate { this.RefreshTalentsPrevious(); }); } }); }