123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System;
- using System.Collections.Generic;
- using Excel2Json;
- using Fort23.UTool;
- namespace GameLogic.Hero
- {
- public class FaBaoInfo
- {
- /// <summary>
- /// 星级
- /// </summary>
- public int star;
- public FabaoConfig FabaoConfig;
- public FabaoPowerupConfig FabaoPowerupConfig;
- public SkillConfig SkillConfig;
- public float[] effectValue;
- public long qiangDu;
- public Dictionary<int, long> attriButedIC = new Dictionary<int, long>();
- public FaBaoInfo(int id, int powerupId, int start = 1)
- {
- star = 1;
- FabaoConfig = ConfigComponent.Instance.Get<FabaoConfig>(id);
- FabaoPowerupConfig = ConfigComponent.Instance.Get<FabaoPowerupConfig>(powerupId);
- SkillConfig = ConfigComponent.Instance.Get<SkillConfig>(FabaoConfig.SkillGroupID * 10 + start - 1);
- effectValue = new float[SkillConfig.effectValue.Length];
- Array.Copy(SkillConfig.effectValue, effectValue, SkillConfig.effectValue.Length);
- attriButedIC.Clear();
- //计算加得属性
- for (var i = 0; i < FabaoConfig.ShuxingIDs.Length; i++)
- {
- long attribute = GetAttriBute(FabaoConfig.ShuxingIDs[i]);
- long value = (long)(attribute * FabaoConfig.ShuxingPara[0] * 0.01f);
- attriButedIC.Add(FabaoConfig.ShuxingIDs[i], value);
- }
- qiangDu = (long)(FabaoPowerupConfig.Power * SkillConfig.power * 0.01f);
- }
- private long GetAttriBute(int type)
- {
- switch (type)
- {
- case 1:
- return FabaoPowerupConfig.HP;
- case 2:
- return FabaoPowerupConfig.HP;
- case 3:
- return FabaoPowerupConfig.HP;
- }
- return 0;
- }
- }
- }
|