修改,特技战力加成通过时装表获得
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// 时装表
|
||||
import { decodeArrayListStr, readJsonFile, parseNumberList } from '../util';
|
||||
import { decodeArrayListStr, readJsonFile } from '../util';
|
||||
import { FILENAME } from '../../consts';
|
||||
|
||||
export interface DicFashions {
|
||||
// 时装id
|
||||
readonly id: number;
|
||||
// 增加的被动技能
|
||||
readonly seid: Array<number>;
|
||||
// 指向heroSkill表
|
||||
readonly skillId: number;
|
||||
// 全局加成
|
||||
readonly globalAttr: Array<{id: number, number: number}>;
|
||||
// 单体加成
|
||||
@@ -20,7 +20,6 @@ let arr = JSON.parse(str);
|
||||
|
||||
export const dicFashions = new Map<number, DicFashions>();
|
||||
arr.forEach(o => {
|
||||
o.seid = parseNumberList(o.seid);
|
||||
o.globalAttr = parseAttr(o.globalAttr);
|
||||
o.actorAttr = parseAttr(o.actorAttr);
|
||||
dicFashions.set(o.id, o);
|
||||
|
||||
@@ -9,9 +9,9 @@ export interface DicHeroSkill {
|
||||
// 技能名
|
||||
readonly name: string;
|
||||
// 星级解锁
|
||||
readonly starSeidArr: Array<{star: number, value: number}>;
|
||||
readonly starSeidArr: Array<{star: number, value: number, type: number}>;
|
||||
// 觉醒解锁
|
||||
readonly colorStarSeidArr: Array<{star: number, value: number}>;
|
||||
readonly colorStarSeidArr: Array<{star: number, value: number, type: number}>;
|
||||
|
||||
}
|
||||
|
||||
@@ -26,15 +26,15 @@ arr.forEach(o => {
|
||||
});
|
||||
|
||||
function parseSeid(str: string) {
|
||||
let arr = new Array<{star: number, value: number}>();
|
||||
let arr = new Array<{star: number, value: number, type: number}>();
|
||||
if(!str) return arr;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [star, value] of decodeArr) {
|
||||
if(isNaN(parseInt(star)) || isNaN(parseInt(value))) {
|
||||
for(let [star, value, type] of decodeArr) {
|
||||
if(isNaN(parseInt(star)) || isNaN(parseInt(value)) || isNaN(parseInt(type))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
arr.push({ star: parseInt(star), value: parseInt(value)});
|
||||
arr.push({ star: parseInt(star), value: parseInt(value), type: parseInt(type)});
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
Reference in New Issue
Block a user