✨ feat(gvg): 任务
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user