private COMDT_BURNING_LEVEL_DETAIL _getLevelDetail(EDifficultyType type) { if (this._mapDetails.ContainsKey((uint)type)) { return(this._mapDetails[(uint)type]); } return(null); }
public void SetLevelDetail(EDifficultyType type, COMDT_BURNING_LEVEL_DETAIL detail) { if (!this._mapDetails.ContainsKey((uint)type)) { this._mapDetails.Add((uint)type, detail); } else { this._mapDetails[(uint)type] = detail; } }
public int Get_LastUnlockLevelIndex(EDifficultyType type) { COMDT_BURNING_LEVEL_INFO[] astLevelDetail = this._getLevelDetail(type).astLevelDetail; for (int i = this.Get_LevelNum(type) - 1; i >= 0; i--) { if (astLevelDetail[i].bLevelStatus == 1) { return(i); } } return(-1); }
public int Get_ResetNum(EDifficultyType type) { ResGlobalInfo dataByKey = GameDataMgr.globalInfoDatabin.GetDataByKey((uint)0x2b); if (dataByKey == null) { return(0); } int dwConfValue = (int)dataByKey.dwConfValue; if (this._getLevelDetail(type) == null) { return(0); } return(dwConfValue - this._getLevelDetail(type).bResetNum); }
public void SetProgress(COMDT_BURNING_LEVEL_PROGRESS data) { if (data != null) { this._data = data; this._mapDetails.Clear(); for (int i = 0; i < data.bDiffNum; i++) { COMDT_BURNING_LEVEL_DETAIL comdt_burning_level_detail = data.astDiffDetail[i]; EDifficultyType bDifficultType = (EDifficultyType)comdt_burning_level_detail.bDifficultType; if (!this._mapDetails.ContainsKey((uint)bDifficultType)) { this._mapDetails.Add((uint)bDifficultType, comdt_burning_level_detail); } if (!this._hero_map.ContainsKey((uint)bDifficultType)) { this._hero_map.Add((uint)bDifficultType, new Dictionary <uint, int>()); } Dictionary <uint, int> dictionary = this._hero_map[comdt_burning_level_detail.bDifficultType]; if (dictionary != null) { for (int j = 0; j < comdt_burning_level_detail.stHeroDetail.wHeroNum; j++) { COMDT_BURNING_HERO_INFO comdt_burning_hero_info = comdt_burning_level_detail.stHeroDetail.astHeroList[j]; if (dictionary.ContainsKey(comdt_burning_hero_info.dwHeroID)) { dictionary[comdt_burning_hero_info.dwHeroID] = (int)comdt_burning_hero_info.dwBloodTTH; } else { dictionary.Add(comdt_burning_hero_info.dwHeroID, (int)comdt_burning_hero_info.dwBloodTTH); } } } } this.CalcProgress(); } }
private void Set_Level_State(EDifficultyType type, int levelIndex, COM_LEVEL_STATUS state) { this._getLevelDetail(this.curDifficultyType).astLevelDetail[levelIndex].bLevelStatus = (byte)state; }
public void Set_ENEMY_TEAM_INFO(EDifficultyType type, int levelNo, COMDT_BURNING_ENEMY_TEAM_INFO info) { this._getLevelDetail(type).astLevelDetail[levelNo].stEnemyDetail = info; }
private void Set_Box_State(EDifficultyType type, int boxIndex, COM_LEVEL_STATUS state) { this._getLevelDetail(this.curDifficultyType).astLevelDetail[boxIndex].bRewardStatus = (byte)state; }
public int Get_LevelNum(EDifficultyType type) { return(this._getLevelDetail(type).bLevelNum); }
public int Get_LevelID(EDifficultyType type, int levelNo) { return(this._getLevelDetail(type).astLevelDetail[levelNo].iLevelID); }
public COMDT_BURNING_LEVEL_INFO[] Get_LevelArray(EDifficultyType type) { return(this._getLevelDetail(type).astLevelDetail); }
public uint Get_LastPlayTime(EDifficultyType type) { return(this._getLevelDetail(type).dwLastPlayTime); }
public COMDT_BURNING_ENEMY_TEAM_INFO Get_ENEMY_TEAM_INFO(EDifficultyType type, int levelNo) { return(this._getLevelDetail(type).astLevelDetail[levelNo].stEnemyDetail); }