From 09bc892c7283df8757a07b646d5af21ddaa263d1 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 06 十一月 2025 18:22:34 +0800
Subject: [PATCH] 164 天子的考验-客户端
---
Main/System/Hero/HeroInfo.Break.cs | 83 ++++++++++++++++++++++++++++++++---------
1 files changed, 64 insertions(+), 19 deletions(-)
diff --git a/Main/System/Hero/HeroInfo.Break.cs b/Main/System/Hero/HeroInfo.Break.cs
index e91b69c..decda04 100644
--- a/Main/System/Hero/HeroInfo.Break.cs
+++ b/Main/System/Hero/HeroInfo.Break.cs
@@ -1,19 +1,15 @@
+//姝﹀皢绐佺牬锛氭灏嗗崌绾у悗闇�瑕佺獊鐮存墠鑳界户缁崌绾э紝绐佺牬鍙幏寰楁綔鑳�
+using System.Collections.Generic;
public partial class HeroInfo
{
// 绐佺牬閰嶇疆
- public HeroBreakConfig breakConfig
- {
- get
- {
- return HeroBreakConfig.GetHeroBreakConfig(heroId, breakLevel);
- }
- }
+ public HeroBreakConfig breakConfig { get; private set;}
// 鍝佽川绐佺牬閰嶇疆
- public HeroQualityBreakConfig qualityBreakConfig;
+ public HeroQualityBreakConfig qualityBreakConfig { get; private set;}
// 姝﹀皢绐佺牬绛夌骇
public int breakLevel
@@ -26,17 +22,66 @@
}
}
- protected int GetBreakCultivationPercent(HeroAttrType attrType)
+ Dictionary<int, int> breakAttrs = new Dictionary<int, int>(); //娼滆兘灞炴�d锛氭綔鑳藉��
+ //璁$畻娼滆兘灞炴��
+ public void RefreshBreakAttr()
{
- // YYL TODO
- return 0;
- }
-
- protected int GetIFByInheritBreakPercent(HeroAttrType attrType)
- {
- // YYL TODO
- return 0;
- }
-
+ breakAttrs.Clear();
+ for (int i = 0; i < breakLevel; i++)
+ {
+ var tmpBreakConfig = HeroBreakConfig.GetHeroBreakConfig(heroId, i);
+ if (tmpBreakConfig == null)
+ continue;
+ for(int j = 0; j < tmpBreakConfig.AttrIDList.Length; j++)
+ {
+ int id = tmpBreakConfig.AttrIDList[j];
+ if (id == 0)
+ continue;
+ if (!breakAttrs.ContainsKey(id))
+ {
+ breakAttrs.Add(id, tmpBreakConfig.AttrValueList[j]);
+ }
+ else
+ {
+ breakAttrs[id] += tmpBreakConfig.AttrValueList[j];
+ }
+ }
+ if (tmpBreakConfig.SkillID != 0)
+ {
+ var skillConfig = SkillConfig.Get(tmpBreakConfig.SkillID);
+ if (skillConfig == null) continue;
+ if (allSkillTypeIDToID.ContainsKey(skillConfig.SkillTypeID))
+ {
+ var tmpSkillConfig = SkillConfig.Get(allSkillTypeIDToID[skillConfig.SkillTypeID]);
+ if (skillConfig.SkillLV > tmpSkillConfig.SkillLV)
+ {
+ //鍙栨渶澶ф妧鑳�
+ allSkillTypeIDToID[skillConfig.SkillTypeID] = tmpBreakConfig.SkillID;
+ }
+ }
+ else
+ {
+ allSkillTypeIDToID[skillConfig.SkillTypeID] = tmpBreakConfig.SkillID;
+ }
+ }
+ }
+ }
+
+ public int GetBreakAttrValue(int attrType)
+ {
+ int value = 0;
+ breakAttrs.TryGetValue(attrType, out value);
+ return value;
+ }
+
+ public int GetBreakAttrPer(int attrType)
+ {
+ if (PlayerPropertyConfig.baseAttr2perDict.ContainsKey(attrType))
+ {
+ var pertype = PlayerPropertyConfig.baseAttr2perDict[attrType];
+ return breakAttrs.ContainsKey(pertype) ? breakAttrs[pertype] : 0;
+ }
+ return 0;
+ }
}
--
Gitblit v1.8.0