✨ feat(gvg): 激战期数据补充、排行榜等
This commit is contained in:
@@ -13,6 +13,8 @@ export interface DicGVGArea {
|
||||
readonly cityId: number;
|
||||
// 城池类型
|
||||
readonly cityType: number;
|
||||
// 城池名字
|
||||
readonly cityName: string;
|
||||
// 区域类型 1-守方备战区 2-攻方备战区 3-大据点区 4-中据点区 5-小据点区 6-投石车区
|
||||
readonly areaType: number;
|
||||
// 区域管理
|
||||
@@ -22,7 +24,7 @@ export interface DicGVGArea {
|
||||
}
|
||||
|
||||
export const dicGVGArea = new Map<number, DicGVGArea>();
|
||||
export const dicGVGCity = new Map<number, { cityType: number, areaIds: number[], defenseBirth: number, attackBirth: number }>();
|
||||
export const dicGVGCity = new Map<number, { cityType: number, areaIds: number[], defenseBirth: number, attackBirth: number, cityName: string }>();
|
||||
export function loadGVGArea() {
|
||||
dicGVGArea.clear();
|
||||
dicGVGCity.clear();
|
||||
@@ -31,7 +33,7 @@ export function loadGVGArea() {
|
||||
arr.forEach(o => {
|
||||
o.relateArea = parseNumberList(o.relateArea);
|
||||
if(!dicGVGCity.has(o.cityId)) {
|
||||
dicGVGCity.set(o.cityId, { cityType: o.cityType, areaIds: [], defenseBirth: 0, attackBirth: 0 });
|
||||
dicGVGCity.set(o.cityId, { cityType: o.cityType, areaIds: [], defenseBirth: 0, attackBirth: 0, cityName: o.cityName });
|
||||
}
|
||||
dicGVGCity.get(o.cityId)?.areaIds.push(o.areaId);
|
||||
if(o.areaType == 1) dicGVGCity.get(o.cityId).defenseBirth = o.areaId;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// GVG城池
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
import { readFileAndParse } from '../util'
|
||||
|
||||
export interface DicGVGCityAdd {
|
||||
@@ -11,6 +12,8 @@ export interface DicGVGCityAdd {
|
||||
readonly mineralAdd: number;
|
||||
// 木头加成
|
||||
readonly woodAdd: number;
|
||||
// 占领积分
|
||||
readonly occupyReward: RewardInter[];
|
||||
}
|
||||
|
||||
export const dicGVGCityAdd = new Map<number, DicGVGCityAdd>();
|
||||
|
||||
Reference in New Issue
Block a user