feat(gvg): 添加gvg积分点资源

This commit is contained in:
luying
2023-02-08 11:17:56 +08:00
parent fbfecc999f
commit b72c5df0d5
4 changed files with 2174 additions and 15 deletions

View File

@@ -131,6 +131,7 @@ import { dicGVGVestigeByType, dicGVGVestigeName, loadGVGVestigeType } from './di
import { dicGVGVestige, loadGVGVestige } from './dictionary/DicGVGVestige';
import { DicGVGVestigeRange, dicGVGVestigeRange, loadGVGVestigeRange } from './dictionary/DicGVGVestigeRange';
import { DicGVGVestigeLeagueRank, dicGVGVestigeLeagueRank, loadGVGVestigeLeagueRank } from "./dictionary/DicGVGVestigeLeagueRank";
import { dicGVGAreaPoint, loadGVGAreaPoint } from "./dictionary/DicGVGAreaPoint";
export const gameData = {
daily: dicDaily,
@@ -330,6 +331,7 @@ export const gameData = {
gvgVestigeRange: dicGVGVestigeRange,
gvgVestigeLeagueRank: dicGVGVestigeLeagueRank,
gvgVestigeName: dicGVGVestigeName,
gvgAreaPoint: dicGVGAreaPoint,
};
// 在此提供一些原先在gamedata中提供的方法以便更方便获取gameData数据
@@ -1407,6 +1409,7 @@ function loadDatas() {
loadGVGVestige();
loadGVGVestigeRange();
loadGVGVestigeLeagueRank();
loadGVGAreaPoint();
}
// 重载dicParam

View File

@@ -0,0 +1,25 @@
// GVG城池
import { FILENAME } from '../../consts'
import { readFileAndParse } from '../util'
export interface DicGVGAreaPoint {
// 积分点id
readonly pointId: number;
// 区域id
readonly areaId: number;
// 积分
readonly score: number;
// 位置
readonly pointPosition: string;
}
export const dicGVGAreaPoint = new Map<number, DicGVGAreaPoint>();
export function loadGVGAreaPoint() {
dicGVGAreaPoint.clear();
let arr = readFileAndParse(FILENAME.DIC_GVG_AREA_POINT);
arr.forEach(o => {
dicGVGAreaPoint.set(o.pointId, o);
});
arr = undefined;
}