修改字段

This commit is contained in:
luying
2020-09-30 18:44:29 +08:00
parent 160f32bf9e
commit b74ba7757d
17 changed files with 42 additions and 95 deletions

View File

@@ -77,10 +77,18 @@ export default class Utils extends Service {
});
}
public getWarById(warid) {
let warInfo = gamedata['dic_zyz_gk']||[];
return warInfo.find(cur => {
return cur.war_id == warid
});
const wars = ['dic_zyz_gk_main', 'dic_zyz_gk_mainElite', 'dic_zyz_gk_daily', 'dic_zyz_gk_event']; // 关卡相关的表
let result;
for(let filename of wars) {
let warInfo = gamedata[filename]||[];
for(let war of warInfo) {
if(war.war_id == warid) {
result = war; break;
}
}
if(result) break;
}
return result||[];
}
public getGoodById(gid) {