修改远征创建记录逻辑
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user