From 142a75387482ec87b70535cc760268d035d29199 Mon Sep 17 00:00:00 2001 From: luying Date: Thu, 29 Jun 2023 09:57:58 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E6=8B=8D=E5=8D=96=E8=A1=8C)?= =?UTF-8?q?:=20=E5=BB=B6=E9=95=BF=E7=AB=9E=E4=BB=B7=E6=9C=89=E6=97=B6?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E9=81=93=E5=85=B7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/auctionService.ts | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/game-server/app/services/auctionService.ts b/game-server/app/services/auctionService.ts index b11d21e78..e82b2b7bb 100644 --- a/game-server/app/services/auctionService.ts +++ b/game-server/app/services/auctionService.ts @@ -494,29 +494,29 @@ export async function pushAuctionOver(lot: LotType) { } export async function pushAuctionUpdate(lots: LotType[], dividends: DividendType[]) { - let lotsByGuild = new Map(); - let lotsByServer = new Map(); + // let lotsByGuild = new Map(); + // let lotsByServer = new Map(); - for(let lot of lots) { - if(lot.auctionStage === AUCTION_STAGE.DEFAULT || lot.auctionStage === AUCTION_STAGE.GUILD) { - if(!lotsByGuild.has(lot.guildCode)) { - lotsByGuild.set(lot.guildCode, []); - } - lotsByGuild.get(lot.guildCode).push(lot); - } else { - if(!lotsByServer.has(lot.serverId)) { - lotsByServer.set(lot.serverId, []); - } - lotsByServer.get(lot.serverId).push(lot); - } - } + // for(let lot of lots) { + // if(lot.auctionStage === AUCTION_STAGE.DEFAULT || lot.auctionStage === AUCTION_STAGE.GUILD) { + // if(!lotsByGuild.has(lot.guildCode)) { + // lotsByGuild.set(lot.guildCode, []); + // } + // lotsByGuild.get(lot.guildCode).push(lot); + // } else { + // if(!lotsByServer.has(lot.serverId)) { + // lotsByServer.set(lot.serverId, []); + // } + // lotsByServer.get(lot.serverId).push(lot); + // } + // } - for(let [guildCode, lots] of lotsByGuild) { - await sendMessageToGuildWithSuc(guildCode, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) }); - } - for(let [serverId, lots] of lotsByServer) { - await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) }); - } + // for(let [guildCode, lots] of lotsByGuild) { + // await sendMessageToGuildWithSuc(guildCode, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) }); + // } + // for(let [serverId, lots] of lotsByServer) { + // await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.AUCTION_UPDATE, { lots: processLotsFormat(lots) }); + // } let dividendsResult = new Map(); for(let dividend of dividends) {