| | |
| | | }
|
| | | }
|
| | |
|
| | | public int GetMinPetLv()
|
| | | public int GetMinPetExp()
|
| | | {
|
| | | int GetPetId = 0;
|
| | | int petLv = 0;
|
| | |
|
| | | int NeedExp = 99999999;
|
| | | for (int i = 0; i < Sortpet.Count; i++)
|
| | | {
|
| | | int petID = Sortpet[i].ID;
|
| | | if (_DicPetBack.ContainsKey(petID))
|
| | | if (_DicPetBack.ContainsKey(petID) && _DicPetBack[petID].PetClass < Config.Instance.Get<PetInfoConfig>(petID).MaxRank)
|
| | | {
|
| | | var key = petID;
|
| | | if (petLv == 0 && _DicPetBack[key].PetClass < GetPetSkillMaxLv(key))
|
| | | int _NeedExp = PetClassCostConfig.GetPetIdAndRank(petID, _DicPetBack[petID].PetClass).UpNeedExp;
|
| | | if (_NeedExp - _DicPetBack[petID].petExp < NeedExp)
|
| | | {
|
| | | petLv = _DicPetBack[key].PetClass;
|
| | | GetPetId = key;
|
| | | }
|
| | | if (_DicPetBack[key].PetClass < petLv && _DicPetBack[key].PetClass < GetPetSkillMaxLv(key))
|
| | | {
|
| | | petLv = _DicPetBack[key].PetClass;
|
| | | GetPetId = key;
|
| | | NeedExp = _NeedExp - _DicPetBack[petID].petExp;
|
| | | GetPetId = petID;
|
| | | }
|
| | | }
|
| | | }
|