|
@@ -2,6 +2,7 @@ using System;
|
|
|
using System.Collections.Generic;
|
|
|
using Excel2Json;
|
|
|
using Fort23.UTool;
|
|
|
+using UnityEngine;
|
|
|
|
|
|
namespace GameLogic.Hero
|
|
|
{
|
|
@@ -21,8 +22,8 @@ namespace GameLogic.Hero
|
|
|
public long qiangDu;
|
|
|
|
|
|
public Dictionary<int, long> attriButedIC = new Dictionary<int, long>();
|
|
|
-
|
|
|
- public AccountFileInfo.FaBaoData FaBaoData;
|
|
|
+
|
|
|
+ public AccountFileInfo.FaBaoData FaBaoData;
|
|
|
|
|
|
public FaBaoInfo(AccountFileInfo.FaBaoData faBaoData)
|
|
|
{
|
|
@@ -39,7 +40,7 @@ namespace GameLogic.Hero
|
|
|
public FaBaoInfo(int id, int powerupId, int start = 1)
|
|
|
{
|
|
|
FaBaoData = new AccountFileInfo.FaBaoData();
|
|
|
- FaBaoData.level= powerupId;
|
|
|
+ FaBaoData.level = powerupId;
|
|
|
FaBaoData.id = id;
|
|
|
// FaBaoData.useIndex = start;
|
|
|
FabaoConfig = ConfigComponent.Instance.Get<FabaoConfig>(id);
|
|
@@ -56,8 +57,7 @@ namespace GameLogic.Hero
|
|
|
{
|
|
|
LogTool.Error("找不到法宝技能id:" + id);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
|
|
|
attriButedIC.Clear();
|
|
|
|
|
@@ -75,8 +75,8 @@ namespace GameLogic.Hero
|
|
|
public void CustomInit(AccountFileInfo.FaBaoData faBaoData)
|
|
|
{
|
|
|
FaBaoData = faBaoData;
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
FabaoConfig = ConfigComponent.Instance.Get<FabaoConfig>(faBaoData.id);
|
|
|
FabaoPowerupConfig = ConfigComponent.Instance.Get<FabaoPowerupConfig>(faBaoData.level);
|
|
|
SkillConfig = ConfigComponent.Instance.Get<SkillConfig>(FabaoConfig.SkillGroupID * 10 + FabaoPowerupConfig.SkillLevel - 1);
|
|
@@ -89,7 +89,7 @@ namespace GameLogic.Hero
|
|
|
{
|
|
|
LogTool.Error("找不到法宝技能id:" + (FabaoConfig.SkillGroupID * 10 + FabaoPowerupConfig.SkillLevel - 1));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
attriButedIC.Clear();
|
|
|
|
|
@@ -97,13 +97,15 @@ namespace GameLogic.Hero
|
|
|
for (var i = 0; i < FabaoConfig.ShuxingIDs.Length; i++)
|
|
|
{
|
|
|
float attribute = GetAttriBute(FabaoConfig.ShuxingIDs[i]);
|
|
|
- long value = (long)(attribute * FabaoConfig.ShuxingPara[i] * 0.01f);
|
|
|
+
|
|
|
+ long value = Mathf.RoundToInt(attribute * FabaoConfig.ShuxingPara[i] * 0.01f);
|
|
|
attriButedIC.Add(FabaoConfig.ShuxingIDs[i], value);
|
|
|
}
|
|
|
|
|
|
- qiangDu = (long)(FabaoPowerupConfig.Power * SkillConfig.power * 0.01f);
|
|
|
+ qiangDu = Mathf.RoundToInt(FabaoPowerupConfig.Power * SkillConfig.power * 0.01f);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
private float GetAttriBute(int type)
|
|
|
{
|
|
|
switch (type)
|