// Token: 0x0600400D RID: 16397 RVA: 0x001298E8 File Offset: 0x00127AE8 public void SetCommonSuccessCooperateBattleLevel(ConfigDataCooperateBattleLevelInfo Level, List <int> Heroes, List <int> BattleTreasures) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetCommonSuccessCooperateBattleLevelConfigDataCooperateBattleLevelInfoList ` 1List ` 1_hotfix != null) { this.m_SetCommonSuccessCooperateBattleLevelConfigDataCooperateBattleLevelInfoList ` 1List ` 1_hotfix.call(new object[] { this, Level, Heroes, BattleTreasures }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_battle.AddBattleTreasures(BattleTreasures); this.m_basicInfo.AddPlayerExp(Level.PlayerExp); this.m_battle.AddFightHeroFightNumsAndExp(Heroes, Level.HeroExp); this.m_basicInfo.AddGold(Level.Gold, GameFunctionType.GameFunctionType_CooperateBattle, Level.ID.ToString()); int num = Level.EnergySuccess - Level.EnergyFail; if (num > 0) { this.m_basicInfo.DecreaseEnergy(num, GameFunctionType.GameFunctionType_HeroPhantom, Level.ID.ToString()); } this.m_battle.WinPveBattle(Level.Battle_ID); CooperateBattleLevel firstCooperateBattleLevel = this.m_cooperateBattleDS.GetFirstCooperateBattleLevel(Level.ID, false); if (firstCooperateBattleLevel != null && this.GetDailyChallengeNums(firstCooperateBattleLevel.WhichCooperateBattle.ID) > 0) { this.m_cooperateBattleDS.IncreaseChallengedNums(firstCooperateBattleLevel.WhichCooperateBattle.ID, 1); } this.FinishedCooperateBattleLevel(firstCooperateBattleLevel, Heroes); }
// Token: 0x0600400C RID: 16396 RVA: 0x001297E0 File Offset: 0x001279E0 public virtual int CanAttackCooperateBattleLevel(int LevelId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanAttackCooperateBattleLevelInt32_hotfix != null) { return(Convert.ToInt32(this.m_CanAttackCooperateBattleLevelInt32_hotfix.call(new object[] { this, LevelId }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; if (!this.IsGameFunctionOpened()) { return(-4503); } CooperateBattleLevel firstCooperateBattleLevel = this.m_cooperateBattleDS.GetFirstCooperateBattleLevel(LevelId, true); int result = 0; if (firstCooperateBattleLevel == null) { result = -4501; } else { int id = firstCooperateBattleLevel.WhichCooperateBattle.ID; if (this.CheckCooperateBattleAvailable(id, ref result) && this.CheckCooperateBattleLevelAvailable(id, LevelId, ref result) && this.CheckPlayerOutOfBattle(ref result) && this.CheckEnergy(id, LevelId, ref result) && this.CheckBag(id, LevelId, ref result)) { return(result); } } return(result); }
// 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: 0x06004AD3 RID: 19155 RVA: 0x001750D0 File Offset: 0x001732D0 public CooperateBattleLevel GetFirstCooperateBattleLevel(int LevelId, bool MustBeAvailable) { foreach (CooperateBattle cooperateBattle in this.BattleCollections.Battles) { if (!MustBeAvailable || cooperateBattle.IsAvailableForChallenge) { CooperateBattleLevel cooperateBattleLevel = cooperateBattle.Levels.Find((CooperateBattleLevel l) => l.ID == LevelId); if (cooperateBattleLevel != null) { return(cooperateBattleLevel); } } } return(null); }
// Token: 0x06004008 RID: 16392 RVA: 0x00129584 File Offset: 0x00127784 public bool CheckEnergy(int BattleId, int LevelId, ref int Err) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CheckEnergyInt32Int32Int32__hotfix != null) { return(LuaDelegation.Lua_BlackJack_ProjectL_Common_CooperateBattleCompomentCommon_CheckEnergy_Int32_Int32_Int32(this, this.m_CheckEnergyInt32Int32Int32__hotfix, BattleId, LevelId, ref Err)); } BJLuaObjHelper.IsSkipLuaHotfix = false; CooperateBattleLevel cooperateBattleLevel = this.m_cooperateBattleDS.GetCooperateBattleLevel(BattleId, LevelId); if (!this.m_basicInfo.IsEnergyEnough(cooperateBattleLevel.EnergySuccess)) { Err = -402; return(false); } return(true); }
// Token: 0x0600400E RID: 16398 RVA: 0x00129A68 File Offset: 0x00127C68 protected virtual void FinishedCooperateBattleLevel(CooperateBattleLevel Level, List <int> heroes) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_FinishedCooperateBattleLevelCooperateBattleLevelList ` 1_hotfix != null) { this.m_FinishedCooperateBattleLevelCooperateBattleLevelList ` 1_hotfix.call(new object[] { this, Level, heroes }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; if (!Level.Cleared) { Level.FirstClear = this.m_basicInfo.GetCurrentTime(); } if (this.CompleteCooperateBattleMissionEvent != null) { this.CompleteCooperateBattleMissionEvent(BattleType.CooperateBattle, Level.ID, heroes); } }