✨ feat(寻宝): 队长奖励加成限制上限
This commit is contained in:
@@ -164,6 +164,9 @@ export async function getRealReward(blueprtId: number, roleSts: RoleStatus[], ro
|
||||
let fixRewards: RewardInter[] = [], extraRewards: RewardInter[] = [], hasExtraReward = true;
|
||||
if (roleSt.isCap) {
|
||||
fixRewards.push(...dicReward.captainReward);
|
||||
if(roleSt.isFrd && !roleSt.isRobot) {
|
||||
hasExtraReward = false;
|
||||
}
|
||||
} else {
|
||||
if (roleSt.isFrd && !roleSt.isRobot) {
|
||||
// 情谊值有上限,送到上限为止
|
||||
@@ -201,6 +204,11 @@ export async function getAllAssistCnt(roleId: string) {
|
||||
return teams.length;
|
||||
}
|
||||
|
||||
export async function getCapExtraCnt(roleId: string) {
|
||||
let teams = await ComBattleTeamModel.getCapExtraRewardCnt(roleId, getZeroPointD());
|
||||
return teams.length;
|
||||
}
|
||||
|
||||
export async function getFrd(roleId: string) {
|
||||
let isFrd = false;
|
||||
let cnt = await getAllAssistCnt(roleId);
|
||||
@@ -208,6 +216,13 @@ export async function getFrd(roleId: string) {
|
||||
return isFrd;
|
||||
}
|
||||
|
||||
export async function getCapFrd(roleId: string) {
|
||||
let isFrd = false;
|
||||
let cnt = await getCapExtraCnt(roleId);
|
||||
if (cnt >= TREASURE.TREASURE_CAP_EXTRA_TIME) isFrd = true;
|
||||
return isFrd;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 更新队伍状态
|
||||
* @export
|
||||
|
||||
@@ -15,7 +15,7 @@ import { getFriendList, getApplyList } from './friendService';
|
||||
import { getDailyBattleList } from './dailyBattleService';
|
||||
import { getExpeditionStatus } from './expeditionService';
|
||||
import { getTowerStatus, getHungupRewards, getTasks } from './battleService';
|
||||
import { getAllAssistCnt, getComBtlLvByPlayerLv } from './comBattleService';
|
||||
import { getAllAssistCnt, getCapExtraCnt, getComBtlLvByPlayerLv } from './comBattleService';
|
||||
import { getDungeonData } from './dungeonService';
|
||||
import { PvpSeasonResultModel } from '../db/PvpSeasonResult';
|
||||
import { nowSeconds, getZeroPoint } from '../pubUtils/timeUtil';
|
||||
@@ -317,7 +317,8 @@ async function getComBattleEntryData(role: RoleType) {
|
||||
let { minLv, maxLv } = getComBtlLvByPlayerLv(lv);
|
||||
let refreshTime = nowSeconds() - INFO_WINDOW.TEAM_INFORMATION_TIME;
|
||||
const invitations = await ComBattleTeamModel.findInvitations(roleId, minLv, maxLv, topLineupCe, refreshTime, 1);
|
||||
return { assistCnt, blueprts, hasInvitation: invitations.length > 0, invitationTime: invitations.length > 0?invitations[0].inviteTime: 0 }
|
||||
let capExtraCnt = await getCapExtraCnt(roleId);
|
||||
return { assistCnt, blueprts, hasInvitation: invitations.length > 0, invitationTime: invitations.length > 0?invitations[0].inviteTime: 0, capExtraCnt }
|
||||
}
|
||||
|
||||
export async function pushRefreshTime() {
|
||||
|
||||
Reference in New Issue
Block a user