更新json和部分dictionary定义
This commit is contained in:
@@ -15,7 +15,7 @@ import { dicQuestion } from "./dictionary/DicQuestion";
|
||||
import { dicSe } from "./dictionary/DicSe";
|
||||
import { dicTower } from "./dictionary/DicTower";
|
||||
import { dicTowerTask } from "./dictionary/DicTowerTask";
|
||||
import { dicWar } from "./dictionary/DicWar";
|
||||
import { dicWar, dicWarPvp } from "./dictionary/DicWar";
|
||||
import { dicWarJson } from "./dictionary/DicWarJson";
|
||||
import { dicXunbao } from "./dictionary/DicXunbao";
|
||||
import { SPECIAL_ATTR } from "../consts/consts";
|
||||
@@ -36,6 +36,9 @@ import { dicSchool } from './dictionary/DicSchool';
|
||||
import { dicSchoolRate } from './dictionary/DicSchoolRate';
|
||||
import { dicHeroScroll, preHeroScroll } from './dictionary/DicHeroScroll';
|
||||
import { ABI_TYPE_TO_STAGE } from "../consts";
|
||||
import { dicPvpOpponent } from './dictionary/DicPvpOpponent';
|
||||
import { dicPvpTeamLevel } from './dictionary/DicPvpTeamLevel';
|
||||
import { dicPvpRefreshConsume } from './dictionary/DicPvpRefreshConsume';
|
||||
|
||||
export const gameData = {
|
||||
blurprtCompose: dicBlueprtCompose,
|
||||
@@ -84,7 +87,11 @@ export const gameData = {
|
||||
school: dicSchool,
|
||||
schoolRate: dicSchoolRate,
|
||||
heroScroll: dicHeroScroll,
|
||||
preHeroScroll: preHeroScroll
|
||||
preHeroScroll: preHeroScroll,
|
||||
pvpOpponent: dicPvpOpponent,
|
||||
pvpTeamLevel: dicPvpTeamLevel,
|
||||
pvpWar: dicWarPvp,
|
||||
pvpRefreshConsume: dicPvpRefreshConsume
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -251,4 +258,13 @@ export function getSuit(id: number) {
|
||||
export function getFuncsSwitch(id:number) {
|
||||
const funcInfo = gameData.funcsSwitch.get(id);
|
||||
return funcInfo;
|
||||
}
|
||||
|
||||
export function getPLvByScore(score: number) {
|
||||
let lv = 0;
|
||||
for(let {teamLv, topFiveMin, topFiveMax} of gameData.pvpTeamLevel) {
|
||||
if(score > topFiveMin) lv = teamLv;
|
||||
if(score < topFiveMax) break;
|
||||
}
|
||||
return lv;
|
||||
}
|
||||
Reference in New Issue
Block a user