少年修仙传客户端代码仓库
client_linchunjie
2018-10-18 2bdca925498c2b06de803cd6ec1704faef8eec30
System/Pet/PlayerPetDatas.cs
@@ -353,26 +353,20 @@
        }
    }
    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;
                }
            }
        }