| | |
| | | /// 可生效总波数,生命周期类型为n波内生效才有作用,否则没有意义 |
| | | /// </summary> |
| | | public int TotalEffectWaves; |
| | | |
| | | /// <summary> |
| | | /// 记录玩家选择该buff的次数 |
| | | /// </summary> |
| | | public int SelectCount; |
| | | } |
| | | |
| | | public class EndlessBuffData |
| | |
| | | } |
| | | allEndlessConfig.Add(newConfig); |
| | | } |
| | | |
| | | InitEndlessBuffPool(1); |
| | | GetRandomBuffList(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | if (level >= allEndlessConfig[i].Config.down_level && level <= allEndlessConfig[i].Config.upper_level) |
| | | endlessBuffPool.Add(allEndlessConfig[i]); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 从buff池中删除以后都不会再出现的buff |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | public static void RemoveFromBuffPool(int id) |
| | | { |
| | | for (int i = 0; i < endlessBuffPool.Count; ++i) |
| | | { |
| | | if (endlessBuffPool[i].Config.id == id) |
| | | { |
| | | endlessBuffPool.Remove(endlessBuffPool[i]); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据buff配置表id获取buff数据 |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | public static EndlessBuffConfig GetBuffById(int id) |
| | | { |
| | | for (int i = 0; i < endlessBuffPool.Count; ++i) |
| | | { |
| | | if (endlessBuffPool[i].Config.id == id) |
| | | return endlessBuffPool[i]; |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据品质获得颜色值 |
| | | /// </summary> |
| | | /// <param name="rare"></param> |