feat(gvg): 任务

This commit is contained in:
luying
2023-01-18 10:02:31 +08:00
parent aab08f7ed5
commit 6619e33995
16 changed files with 332 additions and 31 deletions

View File

@@ -20,7 +20,6 @@ import { checkPopUpCondition, checkPopUpConditionInCreateHero, checkPopUpConditi
import { sendMessageToUserWithSuc } from '../pushService';
import { getGoldId } from '../role/rewardService';
import { GachaResultIndb } from '../../domain/activityField/gachaField';
import { ActivityPopUpShopRecModel } from '../../db/ActivityPopUpShopRec';
export async function checkTaskWithRoles(roleId: string, sid: string, taskType: TASK_TYPE, roles: RoleType[]) {
for (let role of roles) {
@@ -43,6 +42,13 @@ export async function checkTask(serverId: number, roleId: string, sid: string, t
await task.saveAndPush(sid);
}
export async function checkGVGTask(serverId: number, roleId: string, sid: string, configId: number, leagueCode: string, taskType: TASK_TYPE, args?: TaskParamInter) {
let task = new CheckTask(serverId, roleId);
task.setParam(taskType, args);
task.setLeague(configId, leagueCode);
await task.saveAndPush(sid);
}
export async function checkTaskInEntry(serverId: number, roleId: string, sid: string, role: RoleType) {
let task = new CheckTask(serverId, roleId);
task.setRole(role);