From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/Hero/HeroInfo.Talent.cs | 114 ++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 97 insertions(+), 17 deletions(-)
diff --git a/Main/System/Hero/HeroInfo.Talent.cs b/Main/System/Hero/HeroInfo.Talent.cs
index d493875..95e3128 100644
--- a/Main/System/Hero/HeroInfo.Talent.cs
+++ b/Main/System/Hero/HeroInfo.Talent.cs
@@ -10,22 +10,32 @@
{
get
{
+ // 鍥犱负瑙夐啋闄嶄綆浜嗘槦绾э紝瀹㈡埛绔嚜宸遍檷浣庢槦绾�
+ if (itemHero == null)
+ return 0;
+
+ return Math.Min(GetCurMaxStar(), heroStarMaxBefore);
+ }
+ }
+
+ // 鍥犱负瑙夐啋闄嶄綆浜嗘槦绾э紝淇濈暀鍘嗗彶鏈�澶ф槦绾�
+ public int heroStarMaxBefore
+ {
+ get
+ {
if (itemHero == null)
return 0;
return itemHero.GetUseDataFirstValue(72);
}
}
- // 75 # 鑻遍泟澶╄祴娲楃偧閿佸畾绱㈠紩鍒楄〃锛屽搴�71澶╄祴ID绱㈠紩
- // 77 # 鑻遍泟澶╄祴娲楃偧闅忔満ID鍒楄〃
- // 79 # 鑻遍泟瑙夐啋鏃堕殢鏈哄ぉ璧嬮�夐」ID鍒楄〃
// 71 # 鑻遍泟澶╄祴ID鍒楄〃
public List<int> talentIDList
{
get
{
if (itemHero == null)
- return null;
+ return new List<int>();
return itemHero.GetUseData(71);
}
}
@@ -36,11 +46,37 @@
get
{
if (itemHero == null)
- return null;
+ return new List<int>();
return itemHero.GetUseData(73);
}
}
+ // 75 # 鑻遍泟澶╄祴娲楃偧閿佸畾绱㈠紩鍒楄〃锛屽搴�71澶╄祴ID绱㈠紩
+ // 娲楃偧閿佸畾瀹㈡埛绔紦瀛樹负鍑嗭紝閲嶇櫥浼氭竻闄わ紝濡傛灉闇�瑕侀噸鐧绘樉绀洪攣瀹氬垯鍐嶅鐞�
+ // 瀛樺偍鐨勬槸绱㈠紩涓嶆槸 鏄惁閿佸畾
+ public List<int> talentLockList = new List<int>();
+
+ // 77 # 鑻遍泟澶╄祴娲楃偧闅忔満ID鍒楄〃
+ public List<int> talentRandomIDList
+ {
+ get
+ {
+ if (itemHero == null)
+ return new List<int>();
+ return itemHero.GetUseData(77);
+ }
+ }
+
+ // 79 # 鑻遍泟瑙夐啋鏃堕殢鏈哄ぉ璧嬮�夐」ID鍒楄〃
+ public List<int> talentAwakeRandomIDList
+ {
+ get
+ {
+ if (itemHero == null)
+ return new List<int>();
+ return itemHero.GetUseData(79);
+ }
+ }
Dictionary<int, int> talentAttrDic = new Dictionary<int, int>(); //灞炴�D : 澶╄祴灞炴�у��
@@ -85,23 +121,67 @@
return 0;
}
- public int GetMaxStarCount()
- {
- if (Quality < 4)
- return HeroUIManager.normalGiftMaxCnt * HeroUIManager.Instance.maxGiftLevel;
- return HeroUIManager.giftMaxCnt * HeroUIManager.Instance.maxGiftLevel;
- }
- public int GetTotalStarCount()
- {
- //talentLvList閲岀殑鍏冪礌鍏ㄩ儴鐩稿姞
- return talentLvList.Sum();
- }
-
+ //澶╄祴浼氭洿蹇埌杈炬弧绾э紱瑙夐啋鍙互鎻愬崌鏄熶笂闄�,濡傚垵濮嬫椂40婊℃槦锛岃閱扻绾у悗50婊℃槦
+ //鍒ゆ柇褰撳墠鏄惁婊℃槦
public bool IsFullStar()
+ {
+ return heroStar >= GetCurMaxStar();
+ }
+
+ //褰撳墠鑳借揪鍒扮殑鏈�澶ф槦绾�
+ public int GetCurMaxStar()
+ {
+ if (HeroAwakeConfig.GetHeroAwakeConfig(heroId, 1) == null)
+ {
+ return HeroQualityConfig.Get(Quality).InitStarUpper;
+ }
+ //鏍规嵁瑙夐啋绱鎻愬崌鏄熶笂闄�
+ int addStarCount = 0;
+ for (int i = 1; i <= awakeLevel; i++)
+ {
+ addStarCount += HeroAwakeConfig.GetHeroAwakeConfig(heroId, i).AddStarUpper;
+ }
+ return HeroQualityConfig.Get(Quality).InitStarUpper + addStarCount;
+ }
+
+ public bool IsFullGift()
{
//妫�鏌alentLvList 鎵�鏈夊厓绱犻兘澶т簬绛変簬10
return talentLvList.All(x => x >= HeroUIManager.Instance.maxGiftLevel);
}
+
+
+ public int GetTalentLockCount()
+ {
+ return talentLockList.Count;
+ }
+
+ //璁剧疆鏄惁閿佸畾锛屽彧瀛樺偍閿佸畾鐨勭储寮�
+ public void SetTalentLockState(int lockIndex, int state)
+ {
+ var index = talentLockList.IndexOf(lockIndex);
+
+ if (state == 1)
+ {
+ if (index < 0)
+ {
+ talentLockList.Add(lockIndex);
+ }
+ return;
+ }
+
+ if (state == 0)
+ {
+ if (index >= 0)
+ {
+ talentLockList.RemoveAt(index);
+ }
+ return;
+ }
+
+
+ }
+
}
--
Gitblit v1.8.0