// Token: 0x06004AD0 RID: 19152 RVA: 0x00174F00 File Offset: 0x00173100 public void UpdateInstantiatedData(DSCooperateBattleNtf DS) { using (List <ProCooperateBattle> .Enumerator enumerator = DS.CooperateBattles.GetEnumerator()) { while (enumerator.MoveNext()) { ProCooperateBattle CB = enumerator.Current; int num = this.BattleCollections.Battles.FindIndex((CooperateBattle p) => p.ID == CB.ConfigId); if (num >= 0) { CooperateBattle cooperateBattle = this.BattleCollections.Battles[num]; using (List <ProCooperateBattleLevel> .Enumerator enumerator2 = CB.LevelsCleared.GetEnumerator()) { while (enumerator2.MoveNext()) { ProCooperateBattleLevel LevelCleared = enumerator2.Current; CooperateBattleLevel cooperateBattleLevel = cooperateBattle.Levels.Find((CooperateBattleLevel l) => l.ID == LevelCleared.ConfigId); if (cooperateBattleLevel != null) { cooperateBattleLevel.FirstClear = new DateTime(LevelCleared.FirstClear); } } } cooperateBattle.ChallengedNums = CB.ChallengedNums; } } } }
// Token: 0x06004AD5 RID: 19157 RVA: 0x001751E0 File Offset: 0x001733E0 public void IncreaseChallengedNums(int BattleId, int Nums) { CooperateBattle cooperateBattle = this.BattleCollections.Battles.Find((CooperateBattle b) => b.ID == BattleId); if (cooperateBattle != null) { cooperateBattle.ChallengedNums += Nums; base.SetDirty(true); } }
// Token: 0x06004AD2 RID: 19154 RVA: 0x00175070 File Offset: 0x00173270 public CooperateBattleLevel GetCooperateBattleLevel(int BattleId, int LevelId) { CooperateBattle cooperateBattle = this.BattleCollections.Battles.Find((CooperateBattle b) => b.ID == BattleId); if (cooperateBattle != null) { return(cooperateBattle.Levels.Find((CooperateBattleLevel l) => l.ID == LevelId)); } return(null); }
// Token: 0x06004005 RID: 16389 RVA: 0x001293D4 File Offset: 0x001275D4 public int GetDailyChallengeNums(int BattleId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_GetDailyChallengeNumsInt32_hotfix != null) { return(Convert.ToInt32(this.m_GetDailyChallengeNumsInt32_hotfix.call(new object[] { this, BattleId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; int dailyBonusMaxNums = this.m_battle.GetDailyBonusMaxNums(GameFunctionType.GameFunctionType_CooperateBattle); CooperateBattle cooperateBattle = this.m_cooperateBattleDS.GetCooperateBattle(BattleId); int num = (cooperateBattle != null) ? cooperateBattle.ChallengedNums : 0; if (dailyBonusMaxNums > num) { return(dailyBonusMaxNums - num); } return(0); }
// Token: 0x06004F5B RID: 20315 RVA: 0x0017EAE4 File Offset: 0x0017CCE4 public void ReloadConfigData() { List <int> list = new List <int>(); for (int i = this.Battles.Count - 1; i >= 0; i--) { if (this.ConfigDataLoader.GetConfigDataCooperateBattleInfo(this.Battles[i].ID) == null) { list.Add(i); } } foreach (int index in list) { this.Battles.RemoveAt(index); } IEnumerable <KeyValuePair <int, ConfigDataCooperateBattleInfo> > allConfigDataCooperateBattleInfo = this.ConfigDataLoader.GetAllConfigDataCooperateBattleInfo(); using (IEnumerator <KeyValuePair <int, ConfigDataCooperateBattleInfo> > enumerator2 = allConfigDataCooperateBattleInfo.GetEnumerator()) { while (enumerator2.MoveNext()) { KeyValuePair <int, ConfigDataCooperateBattleInfo> kv = enumerator2.Current; CooperateBattle cooperateBattle = this.Battles.Find((CooperateBattle b) => b.ID == kv.Value.ID); if (cooperateBattle == null) { cooperateBattle = new CooperateBattle { ID = kv.Value.ID, WhichBattleCollections = this }; this.Battles.Add(cooperateBattle); } cooperateBattle.ConfigDataLoader = this.ConfigDataLoader; } } }