|
@@ -3,6 +3,7 @@ using Common.Utility.CombatEvent;
|
|
|
using Excel2Json;
|
|
|
using Fort23.Core;
|
|
|
using Fort23.UTool;
|
|
|
+using GameLogic.Combat.CombatTool;
|
|
|
using Utility;
|
|
|
|
|
|
namespace GameLogic.Hero
|
|
@@ -13,7 +14,7 @@ namespace GameLogic.Hero
|
|
|
|
|
|
private string _iconZhiYe;
|
|
|
|
|
|
- private Map<HeroAttributeType, int> attributeBlValue = new Map<HeroAttributeType, int>();
|
|
|
+ private Map<HeroAttributeType, float> attributeBlValue = new Map<HeroAttributeType, float>();
|
|
|
|
|
|
|
|
|
public HeroInfo()
|
|
@@ -39,7 +40,7 @@ namespace GameLogic.Hero
|
|
|
|
|
|
public HeroInfo Upgrade()
|
|
|
{
|
|
|
- int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime)/1000);
|
|
|
+ int currentMiao = (int)((TimeHelper.ClientNow() - PlayerManager.Instance.myHero.heroData.upTime) / 1000);
|
|
|
|
|
|
int allexp = currentMiao * PlayerManager.Instance.myHero.powerUpConfig.AutoXiuwei;
|
|
|
heroData.exp += allexp;
|
|
@@ -60,23 +61,33 @@ namespace GameLogic.Hero
|
|
|
List<FaBaoInfo> myAllFaBao = PlayerManager.Instance.FaBaoControl.myAllFaBao;
|
|
|
foreach (var faBaoInfo in myAllFaBao)
|
|
|
{
|
|
|
- int star = faBaoInfo.star;
|
|
|
-
|
|
|
- for (int i = 0; i < star; i++)
|
|
|
+ if (faBaoInfo.SkillConfig.addPropertyType != null)
|
|
|
{
|
|
|
- // if (faBaoInfo.FabaoConfig.StarupShuxingIDs.Length <= i)
|
|
|
- // {
|
|
|
- // break;
|
|
|
- // }
|
|
|
- //
|
|
|
- // int shuxingID = faBaoInfo.FabaoConfig.StarupShuxingIDs[i];
|
|
|
- // int shuxingValue = faBaoInfo.FabaoConfig.StarupShuxingValues[i];
|
|
|
- // ComputeHeroAttributeType(shuxingID, shuxingValue);
|
|
|
+ for (int i = 0; i < faBaoInfo.SkillConfig.addPropertyType.Length; i++)
|
|
|
+ {
|
|
|
+ int shuxingID = faBaoInfo.SkillConfig.addPropertyType[i];
|
|
|
+ float shuxingValue = faBaoInfo.SkillConfig.addPropertyValue[i];
|
|
|
+ ComputeHeroAttributeType(shuxingID, shuxingValue);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
///功法加被动属性
|
|
|
List<SkillInfo> allSkill = PlayerManager.Instance.GongFaControl.allSkill;
|
|
|
+ for (int j = 0; j < allSkill.Count; j++)
|
|
|
+ {
|
|
|
+ SkillInfo skillInfo = allSkill[j];
|
|
|
+ if (skillInfo.skillConfig.addPropertyType != null)
|
|
|
+ {
|
|
|
+ for (int i = 0; i < skillInfo.skillConfig.addPropertyType.Length; i++)
|
|
|
+ {
|
|
|
+ int shuxingID = skillInfo.skillConfig.addPropertyType[i];
|
|
|
+ float shuxingValue = skillInfo.skillConfig.addPropertyValue[i];
|
|
|
+ ComputeHeroAttributeType(shuxingID, shuxingValue);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
foreach (var VARIABLE in attributeBlValue)
|
|
|
{
|
|
|
switch (VARIABLE.Key)
|
|
@@ -95,21 +106,27 @@ namespace GameLogic.Hero
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (CombatController.currActiveCombat != null && CombatController.currActiveCombat.playerHeroEntity != null)
|
|
|
+ {
|
|
|
+ CombatController.currActiveCombat.playerHeroEntity.CurrCombatHeroInfo = this.Copy();
|
|
|
+ CombatController.currActiveCombat.playerHeroEntity.MaxCombatHeroInfo = this.Copy();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void ComputeHeroAttributeType(int shuxingID, int value)
|
|
|
+ private void ComputeHeroAttributeType(int shuxingID, float value)
|
|
|
{
|
|
|
switch ((HeroAttributeType)shuxingID)
|
|
|
{
|
|
|
case HeroAttributeType.HP:
|
|
|
- hp.Value += value;
|
|
|
+ hp.Value += (int)value;
|
|
|
break;
|
|
|
case HeroAttributeType.ATT:
|
|
|
- attack.Value += value;
|
|
|
+ attack.Value += (int)value;
|
|
|
break;
|
|
|
case HeroAttributeType.DEF:
|
|
|
- defense.Value += value;
|
|
|
+ defense.Value += (int)value;
|
|
|
break;
|
|
|
case HeroAttributeType.Gold:
|
|
|
Metal += value;
|
|
@@ -127,7 +144,7 @@ namespace GameLogic.Hero
|
|
|
Earth += value;
|
|
|
break;
|
|
|
case HeroAttributeType.Shields:
|
|
|
- Shield.Value += value;
|
|
|
+ Shield.Value += (int)value;
|
|
|
break;
|
|
|
default:
|
|
|
if (attributeBlValue.TryGetValue((HeroAttributeType)shuxingID, out var value1)
|