武将战力更新,更新表json
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { getHeroInfoById, getStarRatio, getHeroSkillById, getSeidById, getOlySeidByType, getGoodById } from "./gamedata";
|
||||
import { ABI_TYPE, SEID_TYPE } from "../consts/abilityConst";
|
||||
import { WAR_JSON_ATTRIBUTE_TYPE, EXPRESSION } from '../consts/consts';
|
||||
import { getAtrrNameById, ABI_TYPE, SEID_TYPE } from "../consts/abilityConst";
|
||||
import { EXPRESSION } from '../consts/consts';
|
||||
|
||||
export default class Actor {
|
||||
private hid: number = 0;
|
||||
@@ -260,7 +260,7 @@ export default class Actor {
|
||||
let json = {hp: 0, atk: 0, matk: 0, def: 0, mdef: 0, agi: 0, speed: 0, luk: 0, hit: 0, cri: 0, flee: 0, antCri: 0, damageIncrease: 0, damageDecrease: 0, defIngnore: 0, bloodSuck: 0};
|
||||
|
||||
for(let i = ABI_TYPE.ABI_HP;i < ABI_TYPE.ABI_MAX;i++){
|
||||
let field = WAR_JSON_ATTRIBUTE_TYPE[i];
|
||||
let field = getAtrrNameById(i);
|
||||
json[field] = this.getRealAbility(i);
|
||||
}
|
||||
return json
|
||||
|
||||
@@ -30,7 +30,7 @@ const blueprtCompose = new Map<number, any>();
|
||||
const fiendShips = new Map<string, any>();
|
||||
const fashions = new Map<number, any>();
|
||||
const fiendShipHidAandIds = new Map<number, {actorId: number, level:number}>();
|
||||
|
||||
const fiendShipLevelMaps = new Map<number, any>();
|
||||
|
||||
interface dicStar {
|
||||
id: number;
|
||||
@@ -277,7 +277,7 @@ function parseFiendShips() {
|
||||
const data = gamedata['jsons'][file] || [];
|
||||
data.forEach(elem => {
|
||||
if (elem && elem.id) {
|
||||
let hids = elem.memberId.split('|');
|
||||
let hids = elem.memberId.split('&');
|
||||
elem.hids = hids;
|
||||
delete elem.memberId;
|
||||
fiendShips.set(elem.shipId + '_' + elem.level, elem);
|
||||
@@ -293,8 +293,19 @@ function parseFiendShipLevels() {
|
||||
const data = gamedata['jsons'][file] || [];
|
||||
data.sort(function(a, b) {
|
||||
return a.level - b.level;
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function parseFiendShipLevelMaps() {
|
||||
const file = 'dic_zyz_friend_ship_level';
|
||||
const data = gamedata['jsons'][file] || [];
|
||||
data.forEach(elem => {
|
||||
if (elem && elem.id) {
|
||||
fiendShipLevelMaps.set(elem.level, elem);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initData (folder: string) {
|
||||
if(!gamedata.hasOwnProperty(folder)) {
|
||||
gamedata[folder] = {};
|
||||
@@ -375,6 +386,7 @@ function parseData() {
|
||||
parseFashions();
|
||||
parseFiendShips();
|
||||
parseFiendShipLevels();
|
||||
parseFiendShipLevelMaps();
|
||||
parseHeroStar();
|
||||
parseHeroWake();
|
||||
}
|
||||
@@ -578,4 +590,8 @@ export function getHeroStar(quality: number, star: number) {
|
||||
|
||||
export function getHeroWake(quality: number, star: number) {
|
||||
return heroWakeList.get(`${quality}_${star}`);
|
||||
}
|
||||
|
||||
export function getFiendShipLevel(level: number) {
|
||||
return fiendShipLevelMaps.get(level);
|
||||
}
|
||||
Reference in New Issue
Block a user