后台:json上传
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// 武将特技表
|
||||
import { readJsonFile, parseNumberList } from '../util'
|
||||
import { readFileAndParse, parseNumberList } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
|
||||
export interface DicRandomEffectPool {
|
||||
@@ -19,13 +19,13 @@ export interface DicRandomEffectPool {
|
||||
|
||||
}
|
||||
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_RANDOM_EFFECT_POOL);
|
||||
let arr = JSON.parse(str);
|
||||
|
||||
export const dicRandomEffectPool = new Map<number, DicRandomEffectPool>();
|
||||
export function loadRandomEffectPool() {
|
||||
let arr = readFileAndParse(FILENAME.DIC_RANDOM_EFFECT_POOL);
|
||||
|
||||
arr.forEach(o => {
|
||||
o.gainValueArr = parseNumberList(o.gainValue)
|
||||
dicRandomEffectPool.set(o.id, o);
|
||||
});
|
||||
arr.forEach(o => {
|
||||
o.gainValueArr = parseNumberList(o.gainValue)
|
||||
dicRandomEffectPool.set(o.id, o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user