| | |
| | | return;
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < ListInt.Count; i++)
|
| | | for (int i = 0; i < ListInt.Count; i++)//选择出升级灵宠等级最低且有技能未解锁的
|
| | | {
|
| | | if (_DicPetBack.ContainsKey(ListInt[i]))
|
| | | {
|
| | | var PetConfig = Config.Instance.Get<PetInfoConfig>(ListInt[i]);
|
| | | if (PetConfig == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | int[] SkillUnLockInt = PetConfig.SkillUnLock;
|
| | | int SkillLvMax = SkillUnLockInt[(SkillUnLockInt.Length-1)];
|
| | | if (_DicPetBack[(ListInt[i])].PetClass < petLv && _DicPetBack[(ListInt[i])].PetClass<SkillLvMax)
|
| | | {
|
| | | petLv = _DicPetBack[(ListInt[i])].PetClass;
|
| | | GetPetId = (ListInt[i]);
|
| | | }
|
| | | }
|
| | | }
|
| | | if (GetPetId != 0 && CultivateRedPoint.ContainsKey(GetPetId))
|
| | | {
|
| | | CultivateRedPoint[GetPetId].state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | |
|
| | |
|
| | | for (int i = 0; i < ListInt.Count; i++)//选择出等级最低的灵宠
|
| | | {
|
| | | if (_DicPetBack.ContainsKey(ListInt[i]))
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | bool IsFullBool = true;
|
| | | foreach (var key in _DicPetBack.Keys)
|
| | | if (GetPetId != 0 && CultivateRedPoint.ContainsKey(GetPetId))
|
| | | {
|
| | | if (_DicPetBack[key].PetClass < 20)
|
| | | {
|
| | | IsFullBool = false;
|
| | | }
|
| | | }
|
| | | if (CultivateRedPoint.ContainsKey(GetPetId))
|
| | | {
|
| | | if (_DicPetBack[GetPetId].PetClass < 20)
|
| | | {
|
| | | CultivateRedPoint[GetPetId].state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | | else if (_DicPetBack[GetPetId].PetClass >= 20 && IsFullBool)
|
| | | {
|
| | | CultivateRedPoint[GetPetId].state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | | CultivateRedPoint[GetPetId].state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | int GetPetId = 0;
|
| | | int GetPetLv = 999;
|
| | | |
| | | foreach (var key in _DicPetBack.Keys)//无红点时跳转选中等级最低的
|
| | | {
|
| | | if (_DicPetBack[key].PetClass < GetPetLv)
|
| | | var config = Config.Instance.Get<PetInfoConfig>(key);
|
| | | if (_DicPetBack[key].PetClass < GetPetLv && _DicPetBack[key].PetClass < config.MaxRank)
|
| | | {
|
| | | GetPetId = key;
|
| | | GetPetLv = _DicPetBack[key].PetClass;
|