🐞 fix(gvg): 修复gvg显示问题
This commit is contained in:
@@ -26,7 +26,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, cityName: string }>();
|
||||
export const dicGVGCity = new Map<number, { cityType: number, mapType: number, areaIds: number[], defenseBirth: number, attackBirth: number, cityName: string }>();
|
||||
export function loadGVGArea() {
|
||||
dicGVGArea.clear();
|
||||
dicGVGCity.clear();
|
||||
@@ -35,7 +35,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, cityName: o.cityName });
|
||||
dicGVGCity.set(o.cityId, { cityType: o.cityType, mapType: o.mapType, 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,7 +1,7 @@
|
||||
// GVG城池
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
import { readFileAndParse } from '../util'
|
||||
import { parseGoodStr, readFileAndParse } from '../util'
|
||||
|
||||
export interface DicGVGCityAdd {
|
||||
// 城池类型 1-大城 2-中城 3-小城
|
||||
@@ -22,6 +22,7 @@ export function loadGVGCityAdd() {
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_GVG_CITY_ADD);
|
||||
arr.forEach(o => {
|
||||
o.occupyReward = parseGoodStr(o.occupyReward);
|
||||
dicGVGCityAdd.set(o.cityType, o);
|
||||
});
|
||||
arr = undefined;
|
||||
|
||||
Reference in New Issue
Block a user