| | |
| | | m_ScreenMoveTo.gameObject.SetActive(false);
|
| | | BossNotify.OnNotifyStateEvent += OnNotifyStateEvent;
|
| | | BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent;
|
| | | DemonTreasureDungeonVictoryWin.challengeNextEvent += ChallengeNextEvent;
|
| | |
|
| | | var allConfigs = Config.Instance.GetAllValues<TreasureConfig>();
|
| | | foreach (var value in allConfigs)
|
| | |
| | | {
|
| | | BossNotify.OnNotifyStateEvent -= OnNotifyStateEvent;
|
| | | BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent;
|
| | | DemonTreasureDungeonVictoryWin.challengeNextEvent -= ChallengeNextEvent;
|
| | | m_ContainerDisplay.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void ChallengeNextEvent()
|
| | | {
|
| | | if (demonTreasureDungeon)
|
| | | {
|
| | | DisplayDemonTreasureDungeon();
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayNormalTreasureDungeon()
|
| | | {
|
| | | var config = Config.Instance.Get<TreasureConfig>(treasureId);
|
| | |
| | | demonTreasureDungeon = false;
|
| | | if (mapId == 41110)
|
| | | {
|
| | | var list = model.GetTreasureCategory(TreasureCategory.Demon);
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | TreasureDungeon treasureDungeon;
|
| | | if (model.TryGetTreasureDungeon(mapId, lineId, out treasureDungeon))
|
| | | {
|
| | | TreasureDungeon treasureDungeon;
|
| | | if (model.TryGetTreasureDungeon(list[i], out treasureDungeon))
|
| | | if (treasureDungeon.currentLevel < treasureDungeon.maxLevel - 1)
|
| | | {
|
| | | var count = treasureDungeon.dungeonInfos.Count;
|
| | | if (count > 0 && treasureDungeon.dungeonInfos[0].lineId == lineId)
|
| | | {
|
| | | var maxLevel = treasureDungeon.dungeonInfos[count - 1].level;
|
| | | if (treasureDungeon.currentLevel < maxLevel - 1)
|
| | | {
|
| | | demonTreasureDungeon = true;
|
| | | break;
|
| | | }
|
| | | }
|
| | | demonTreasureDungeon = true;
|
| | | }
|
| | | }
|
| | | }
|