From 9be17feb5bdb4e65afe92509ba4b889745d50bcc Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 05 十二月 2018 10:42:09 +0800
Subject: [PATCH] 2577 【BUG】【1.3.100】坐骑、灵宠丹跳转时红点异常
---
System/Pet/PlayerPetDatas.cs | 26 ++++++++++++++------------
System/Mount/PlayerMountDatas.cs | 26 ++++++++++++++------------
2 files changed, 28 insertions(+), 24 deletions(-)
diff --git a/System/Mount/PlayerMountDatas.cs b/System/Mount/PlayerMountDatas.cs
index d12a62e..4e92600 100644
--- a/System/Mount/PlayerMountDatas.cs
+++ b/System/Mount/PlayerMountDatas.cs
@@ -363,20 +363,22 @@
}
public int GetMinExpMount()
- {
- int GetMountID = 0;
- int NeedExp = 99999999;
- for (int i = 0; i < SortMount.Count; i++)
+ {
+ foreach (var key in ASingleFeedRedPoint.Keys)//褰撳瓨鍦ㄩ┋鍏荤孩鐐规椂閫変腑褰撴湁绾㈢偣鐨勯偅鍙�
{
- int horseID = SortMount[i].HorseID;
- if (_DicHorse.ContainsKey(horseID) && _DicHorse[horseID].Lv < Config.Instance.Get<HorseConfig>(horseID).MaxLV)
+ if (ASingleFeedRedPoint[key].state == RedPointState.Simple)
{
- int _NeedExp = HorseUpConfig.GetHorseIDAndLV(horseID, (_DicHorse[horseID].Lv)).NeedExp;
- if (_NeedExp - _DicHorse[horseID].Exp < NeedExp)
- {
- NeedExp = _NeedExp - _DicHorse[horseID].Exp;
- GetMountID = horseID;
- }
+ return key;
+ }
+ }
+ int GetMountID = 0;
+ int MountLV = 999;
+ foreach (var key in _DicHorse.Keys)//鏃犵孩鐐规椂璺宠浆閫変腑鏈�浣庨樁鏁�
+ {
+ if (_DicHorse[key].Lv < MountLV)
+ {
+ GetMountID = key;
+ MountLV = _DicHorse[key].Lv;
}
}
return GetMountID;
diff --git a/System/Pet/PlayerPetDatas.cs b/System/Pet/PlayerPetDatas.cs
index f295f0a..c04f273 100644
--- a/System/Pet/PlayerPetDatas.cs
+++ b/System/Pet/PlayerPetDatas.cs
@@ -391,20 +391,22 @@
}
public int GetMinPetExp()
- {
- int GetPetId = 0;
- int NeedExp = 99999999;
- for (int i = 0; i < Sortpet.Count; i++)
+ {
+ foreach (var key in CultivateRedPoint.Keys)//褰撳瓨鍦ㄥ煿鍏荤孩鐐规椂锛岄�変腑褰撴湁绾㈢偣鐨勯偅鍙�
{
- int petID = Sortpet[i].ID;
- if (_DicPetBack.ContainsKey(petID) && _DicPetBack[petID].PetClass < Config.Instance.Get<PetInfoConfig>(petID).MaxRank)
+ if (CultivateRedPoint[key].state == RedPointState.Simple)
{
- int _NeedExp = PetClassCostConfig.GetPetIdAndRank(petID, _DicPetBack[petID].PetClass).UpNeedExp;
- if (_NeedExp - _DicPetBack[petID].petExp < NeedExp)
- {
- NeedExp = _NeedExp - _DicPetBack[petID].petExp;
- GetPetId = petID;
- }
+ return key;
+ }
+ }
+ int GetPetId = 0;
+ int GetPetLv = 999;
+ foreach (var key in _DicPetBack.Keys)//鏃犵孩鐐规椂璺宠浆閫変腑绛夌骇鏈�浣庣殑
+ {
+ if (_DicPetBack[key].PetClass < GetPetLv)
+ {
+ GetPetId = key;
+ GetPetLv = _DicPetBack[key].PetClass;
}
}
return GetPetId;
--
Gitblit v1.8.0