🐞 fix(gvg): 激战期概况修改
This commit is contained in:
@@ -647,19 +647,19 @@ export class GVGBattleHandler {
|
|||||||
let result: { cityId: number, guardLeagueName: string, areas: { areaId: number, points: { pointId: number, guardLeagueName: string }[] }[] }[] = [];
|
let result: { cityId: number, guardLeagueName: string, areas: { areaId: number, points: { pointId: number, guardLeagueName: string }[] }[] }[] = [];
|
||||||
for(let [ cityId, { mapType, areaIds }] of gameData.gvgCity) {
|
for(let [ cityId, { mapType, areaIds }] of gameData.gvgCity) {
|
||||||
if(mapType != serverType) continue;
|
if(mapType != serverType) continue;
|
||||||
|
let city = cities.find(cur => cur.cityId == cityId);
|
||||||
let areas: { areaId: number, points: {pointId: number, guardLeagueName: string }[]}[] = [];
|
let areas: { areaId: number, points: {pointId: number, guardLeagueName: string }[]}[] = [];
|
||||||
for(let areaId of areaIds) {
|
for(let areaId of areaIds) {
|
||||||
let dicArea = gameData.gvgArea.get(areaId);
|
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 pointIds = gameData.gvgPointByAreaId.get(areaId)||[];
|
||||||
let pointArrs: { pointId: number, guardLeagueName: string }[] = [];
|
let pointArrs: { pointId: number, guardLeagueName: string }[] = [];
|
||||||
for(let pointId of pointIds) {
|
for(let pointId of pointIds) {
|
||||||
let playerPoint = points.find(cur => cur.pointId == pointId);
|
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 });
|
if(pointArrs.length > 0) areas.push({ areaId, points: pointArrs });
|
||||||
}
|
}
|
||||||
let city = cities.find(cur => cur.cityId == cityId);
|
|
||||||
result.push({ cityId, guardLeagueName: city?.guardLeagueName||'', areas });
|
result.push({ cityId, guardLeagueName: city?.guardLeagueName||'', areas });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user