🐞 fix(gvg): 激战期概况修改

This commit is contained in:
luying
2023-02-24 19:07:39 +08:00
parent 947792b635
commit 154c30cd0f

View File

@@ -647,19 +647,19 @@ export class GVGBattleHandler {
let result: { cityId: number, guardLeagueName: string, areas: { areaId: number, points: { pointId: number, guardLeagueName: string }[] }[] }[] = [];
for(let [ cityId, { mapType, areaIds }] of gameData.gvgCity) {
if(mapType != serverType) continue;
let city = cities.find(cur => cur.cityId == cityId);
let areas: { areaId: number, points: {pointId: number, guardLeagueName: string }[]}[] = [];
for(let areaId of areaIds) {
let dicArea = gameData.gvgArea.get(areaId);
if(!dicArea || (dicArea.areaType != GVG_AREA_TYPE.BIG && dicArea.areaType != GVG_AREA_TYPE.MIDDLE && dicArea.areaType == GVG_AREA_TYPE.SMALL) ) continue;
if(!dicArea || (dicArea.areaType != GVG_AREA_TYPE.BIG && dicArea.areaType != GVG_AREA_TYPE.MIDDLE && dicArea.areaType != GVG_AREA_TYPE.SMALL) ) continue;
let pointIds = gameData.gvgPointByAreaId.get(areaId)||[];
let pointArrs: { pointId: number, guardLeagueName: string }[] = [];
for(let pointId of pointIds) {
let playerPoint = points.find(cur => cur.pointId == pointId);
pointArrs.push({ pointId, guardLeagueName: playerPoint? playerPoint.leagueName: '' });
pointArrs.push({ pointId, guardLeagueName: playerPoint? (playerPoint.leagueName||"无"): GVG.GVG_ROBOT_NAME });
}
if(pointArrs.length > 0) areas.push({ areaId, points: pointArrs });
}
let city = cities.find(cur => cur.cityId == cityId);
result.push({ cityId, guardLeagueName: city?.guardLeagueName||'', areas });
}