装备:分解

This commit is contained in:
luying
2022-02-17 14:26:07 +08:00
parent 2bfc27356f
commit ee32f1cdee
5 changed files with 76 additions and 75 deletions

View File

@@ -1,5 +1,5 @@
// 武将特技表
import { readFileAndParse, decodeArrayListStr } from '../util'
import { readFileAndParse, decodeArrayListStr, parseNumberList } from '../util'
import { FILENAME } from '../../consts'
export interface DicRandomEffectPool {
@@ -30,7 +30,8 @@ export function loadRandomEffectPool() {
let arr = readFileAndParse(FILENAME.DIC_RANDOM_EFFECT_POOL);
arr.forEach(o => {
o.rate = parseRate(o.count)
o.rate = parseRate(o.count);
o.gainValueArr = parseNumberList(o.gainvalue);
dicRandomEffectPool.set(o.id, o);
});
arr = undefined;

View File

@@ -1016,6 +1016,7 @@ function addSeidEffect(heroAttrs: CeAttrData[], addSeidList: Array<number>, remo
// 获取dic_zyz_se内容
function addSeid(effectList: Array<any>, seidId: number, rand: number, seidValue = new Array<number>()) {
console.log('##### addSeid', effectList, seidId, rand, seidValue)
let curSeid: DicSe | DicRandomEffectPool = gameData.se.get(seidId);
if (!curSeid) curSeid = gameData.randomEffectPool.get(seidId);
if (!curSeid) { console.log("seidId not found:" + seidId); return; }
@@ -1028,6 +1029,7 @@ function addSeid(effectList: Array<any>, seidId: number, rand: number, seidValue
return;
}
let seid: DicSe | DicRandomEffectPool = deepCopy(curSeid);
console.log('#####', seid)
if (curSeid.index > 0) {
seid.gainValueArr[curSeid.index - 1] = rand;
}