diff --git a/game-server/app/services/auctionService.ts b/game-server/app/services/auctionService.ts index 9cd070d04..9746f1d5f 100644 --- a/game-server/app/services/auctionService.ts +++ b/game-server/app/services/auctionService.ts @@ -494,29 +494,14 @@ export async function pushAuctionOver(lot: LotType) { } export async function pushAuctionUpdate(lots: LotType[], dividends: DividendType[]) { - // 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); - // } - // } + let serverIds: number[] = []; + for(let lot of lots) { + serverIds.push(lot.serverId); + } - // 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 serverId of serverIds) { + await sendMessageToServerWithSuc(serverId, PUSH_ROUTE.AUCTION_UPDATE, { }); + } let dividendsResult = new Map(); for(let dividend of dividends) { diff --git a/game-server/app/services/guildService.ts b/game-server/app/services/guildService.ts index 02398574b..9b922abfc 100644 --- a/game-server/app/services/guildService.ts +++ b/game-server/app/services/guildService.ts @@ -137,8 +137,7 @@ export async function joinGuild(code: string, guildName: string, lv: number, rol await pinus.app.rpc.connector.connectorRemote.setOtherUserGuildSession.toServer(sid,[{ roleId, userGuild }]); sendMessageToUserWithSuc(roleId, PUSH_ROUTE.MEMBER_JOIN_GUILD, { hasGuild: true, code }, sid); session.set('guildCode', code); - let auctionInfo = await getAuction(code, session); - sendMessageToUserWithSuc(roleId, PUSH_ROUTE.AUCTION_UPDATE, auctionInfo, sid); + sendMessageToUserWithSuc(roleId, PUSH_ROUTE.AUCTION_UPDATE, {}, sid); changeGuildActivity(code, serverId, roleId, sid); }