修改远征创建记录逻辑

This commit is contained in:
luying
2020-11-17 10:07:59 +08:00
parent d5a5cfc270
commit 0e2f043f93
26 changed files with 2147 additions and 1150 deletions
+17
View File
@@ -14,6 +14,7 @@ const starRatioInfo = new Map<number, number>();
const heroSkillInfo = new Map<number, any>()
const seidInfo = new Map<number, any>();
const olySeidInfo = new Map<number, any>();
const expeditionInfo = new Map<number, any> ();
function parseWarData() {
let result = null;
@@ -164,6 +165,17 @@ function parseOlySeidList() {
});
}
function parseExpedition() {
const file = 'dic_expedition';
const data = gamedata['jsons'][file] || [];
data.forEach(elem => {
if (elem && elem.id) {
expeditionInfo.set(elem.id, elem);
}
});
}
function initData (folder: string) {
if(!gamedata.hasOwnProperty(folder)) {
@@ -200,6 +212,7 @@ function parseData() {
parseHeroSkill();
parseSeidList();
parseOlySeidList();
parseExpedition();
}
initData('jsons'); // 加载一般json
@@ -282,4 +295,8 @@ export function getSeidById(id: number) {
export function getOlySeidByType(type: number) {
return olySeidInfo.get(type);
}
export function getExpeditionById(id: number) {
return expeditionInfo.get(id);
}