From e1951576fae6e2dcba2a331f614b47d77156b24f Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 04 一月 2019 10:52:40 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Pet/PlayerPetDatas.cs | 53 ++++++++++++++++++++++++++++++++---------------------
1 files changed, 32 insertions(+), 21 deletions(-)
diff --git a/System/Pet/PlayerPetDatas.cs b/System/Pet/PlayerPetDatas.cs
index c04f273..37775a4 100644
--- a/System/Pet/PlayerPetDatas.cs
+++ b/System/Pet/PlayerPetDatas.cs
@@ -356,7 +356,32 @@
return;
}
}
- for (int i = 0; i < ListInt.Count; i++)
+ for (int i = 0; i < ListInt.Count; i++)//閫夋嫨鍑哄崌绾х伒瀹犵瓑绾ф渶浣庝笖鏈夋妧鑳芥湭瑙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]))
{
@@ -367,26 +392,10 @@
}
}
}
- 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;
}
}
@@ -401,9 +410,11 @@
}
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;
--
Gitblit v1.8.0