✨ feat(gvg): 修改战力相关读取方案
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user