🐞 fix(gvg): 激战期队伍下发格式修改
This commit is contained in:
@@ -402,15 +402,19 @@ export async function gvgBattleSeconds() {
|
||||
await redisAddSettleScore(team, addScore);
|
||||
}
|
||||
// 向下推送区域数据
|
||||
let spinesByCity = new Map<number, GVGTeamSpineInMap[]>();
|
||||
for(let areaId of teamObj.findAreas()) {
|
||||
let dicArea = gameData.gvgArea.get(areaId);
|
||||
let teams = teamObj.findTeamsByArea(areaId);
|
||||
let result = teams.map(team => new GVGTeamSpineInMap(team, serverNames));
|
||||
await sendMessageToGVGAreaWithSuc(teamObj.groupKey, areaId, PUSH_ROUTE.GVG_AREA_SPINE_CHANGE, { cityId: dicArea.cityId, areaId, spines: result });
|
||||
|
||||
let spines = teams.map(team => new GVGTeamSpineInMap(team, serverNames));
|
||||
if(!spinesByCity.has(dicArea.cityId)) spinesByCity.set(dicArea.cityId, []);
|
||||
spinesByCity.get(dicArea.cityId).push(...spines);
|
||||
let index = keys.findIndex(cur => cur.cityId == dicArea.cityId && cur.groupKey == teamObj.groupKey);
|
||||
if(index == -1) keys.push({ groupKey: teamObj.groupKey, cityId: dicArea.cityId });
|
||||
}
|
||||
for(let [cityId, spines] of spinesByCity) {
|
||||
await sendMessageToGVGCityWithSuc(teamObj.groupKey, cityId, PUSH_ROUTE.GVG_AREA_SPINE_CHANGE, { cityId, spines });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user