| | |
| | | }
|
| | | }
|
| | |
|
| | | private bool ContainsPotentialBook(int potentialBook)
|
| | | {
|
| | | if (potentialBook == 0)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var potential = m_Treasure.GetPotential(selectedPotential);
|
| | | var levelUpType = model.GetSkillLevelUpType(potential.id);
|
| | | var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
|
| | | var config = Config.Instance.Get<TreasureSkillConfig>(levelupId);
|
| | | for (int i = 0; i < config.Meterial2ID.Length; i++)
|
| | | {
|
| | | if (config.Meterial2ID[i] == potentialBook)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | private int GetNextPotential(int _potentialId)
|
| | | {
|
| | | for (int i = 0; i < m_Treasure.potentials.Count; i++)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | var levelUpConfig = GetPotentialLevelUpConfig();
|
| | | if (levelUpConfig.own < levelUpConfig.need)
|
| | | if (levelUpConfig.own < levelUpConfig.need || !ContainsPotentialBook(model.selectedPotentialBook))
|
| | | {
|
| | | model.selectedPotentialBook = 0;
|
| | | }
|