feat(gvg): 修改战力相关读取方案

This commit is contained in:
luying
2023-01-09 20:00:59 +08:00
parent 2b96f6be6a
commit 54837f24b6
8 changed files with 39 additions and 29 deletions

View File

@@ -12,7 +12,7 @@ import { GVG } from "../../pubUtils/dicParam";
import { getZeroPointD } from "../../pubUtils/timeUtil";
import { resResult } from "../../pubUtils/util";
import { sendMessageToUserWithSuc } from "../pushService";
import { getCurPeriod, getGVGConfig, getGVGPeriodData, getGVGServerType } from "./gvgService";
import { calLeagueCe, getCurPeriod, getGVGConfig, getGVGPeriodData, getGVGServerType } from "./gvgService";
/**
* 自动创建联军
@@ -101,10 +101,11 @@ export function getLeagueApplyData(apply: GVGLeagueApplyType, serverNames: any,
* @param applies 本军团向其他联军发出的申请
* @returns
*/
export function getLeagueInviteData(invite: GVGLeagueApplyType, serverNames: any, applies: GVGLeagueApplyType[]) {
export async function getLeagueInviteData(invite: GVGLeagueApplyType, serverNames: any, applies: GVGLeagueApplyType[]) {
let data = new LeagueListInfo(<GVGLeagueType>invite.league, serverNames);
let hasApply = !!applies.find(cur => cur.leagueCode == invite.guildCode);
data.setHasApply(hasApply);
data.setLeagueCe(await calLeagueCe(<GVGLeagueType>invite.league))
return data;
}