✨ feat(comBattle): 寻宝邀请的推送范围由世界改为军团

This commit is contained in:
liangtongchuan
2023-03-14 11:56:28 +08:00
parent b3c5aa9236
commit 37af7c570a
5 changed files with 17 additions and 15 deletions
+3 -3
View File
@@ -158,7 +158,7 @@ export async function getModuleData(type: string, data: { role: RoleType, sessio
case 'tower': // 镇念塔
return await getTowerEntryData(role);
case 'comBattle': // 寻宝
return await getComBattleEntryData(role);
return await getComBattleEntryData(role, guildCode);
case 'dungeon': // 秘境
return await getDungeonData(role);
case 'pvp': // pvp
@@ -312,13 +312,13 @@ async function getGuildEntryData(role: RoleType, sid: string, session: FrontendO
return { hasGuild: false }
}
async function getComBattleEntryData(role: RoleType) {
async function getComBattleEntryData(role: RoleType, guildCode: string) {
let { roleId, lv, topLineupCe } = role;
const assistCnt = await getAllAssistCnt(roleId);
const blueprts = await Item.findByRoleAndType(roleId, CONSUME_TYPE.BLUEPRT);
let { minLv, maxLv } = getComBtlLvByPlayerLv(lv);
let refreshTime = nowSeconds() - INFO_WINDOW.TEAM_INFORMATION_TIME;
const invitations = await ComBattleTeamModel.findInvitations(roleId, minLv, maxLv, topLineupCe, refreshTime, 1);
const invitations = await ComBattleTeamModel.findInvitations(roleId, guildCode, minLv, maxLv, topLineupCe, refreshTime, 1);
let capExtraCnt = await getCapExtraCnt(roleId);
return { assistCnt, blueprts, hasInvitation: invitations.length > 0, invitationTime: invitations.length > 0?invitations[0].inviteTime: 0, capExtraCnt }
}