chenxin
2020-11-18 2ef9a95def81f3f47f302c86a5709140a6f39ce6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
 * 6.暴击伤害增加
 * @Author: chenxin
 * @Date: 2020-11-17 11:29:29
 */
namespace KTGMGemClient
{
    public class CritDamageAdd : EndlessBuff
    {
        /// <summary>
        /// 根据宝石id获得暴击增加的伤害比率(千分比)
        /// </summary>
        /// <param name="gemId"></param>
        /// <returns></returns>
        public float GetCritDamageRate(int gemId)
        {
            float ret = 0;
 
            for (int i = 0; i < BuffList.Count; ++i)
            {
                if (!IsEffective(BuffList[i], gemId)) continue;
 
                ret += BuffList[i].Config.buff_effect[1] / 1000f;
            }
 
            return ret;
        }
    }
}