diff --git a/Assets/Scripts/UIs/PanelBook.cs b/Assets/Scripts/UIs/PanelBook.cs index dbe38004..bfa39c04 100644 --- a/Assets/Scripts/UIs/PanelBook.cs +++ b/Assets/Scripts/UIs/PanelBook.cs @@ -43,11 +43,24 @@ public class PanelBook : BasePanel tCard = GameConfig.Instance.CardList[i]; if (Utils.IsHuman(tCard.CardID)) { + if (tHumanIndex >= GameConfig.Instance.BlockMaxLevel) + { + mHumanCells[tHumanIndex].gameObject.SetActive(false); + tHumanIndex++; + continue; + } + mHumanCells[tHumanIndex].InitCell(tCard.CardID, !PlayerData.Instance.HasCard(tCard.CardID)); tHumanIndex++; } else if(Utils.IsMonster(tCard.CardID)) { + if (tMonsterIndex >= GameConfig.Instance.BlockMaxLevel) + { + mMonsterCells[tMonsterIndex].gameObject.SetActive(false); + tMonsterIndex++; + continue; + } mMonsterCells[tMonsterIndex].InitCell(tCard.CardID, !PlayerData.Instance.HasCard(tCard.CardID)); tMonsterIndex++; }