🐞 fix(拍卖行): 世界拍卖行切换问题

This commit is contained in:
luying
2023-07-03 20:29:59 +08:00
parent 308b1c657f
commit 7539d4808a
2 changed files with 8 additions and 24 deletions

View File

@@ -494,29 +494,14 @@ export async function pushAuctionOver(lot: LotType) {
}
export async function pushAuctionUpdate(lots: LotType[], dividends: DividendType[]) {
// let lotsByGuild = new Map<string, LotType[]>();
// let lotsByServer = new Map<number, LotType[]>();
// 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<string, DividendType[]>();
for(let dividend of dividends) {

View File

@@ -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);
}