装备:活动任务

This commit is contained in:
luying
2022-02-22 15:29:19 +08:00
parent 3f5371df79
commit 12b4b6668b
6 changed files with 342 additions and 60 deletions
+4 -10
View File
@@ -40,10 +40,10 @@ export async function checkTaskWithEplaces(roleId: string, sid: string, taskType
pushTaskUpdate(roleId, sid, pushMessage);
}
// export async function checkTaskWithEquip(roleId: string, sid: string, taskType: number, equip: EquipType, args?: number[]) {
// let pushMessage = await taskUtil.checkTaskWithEquip(roleId, taskType, equip, args);
// pushTaskUpdate(roleId, sid, pushMessage);
// }
export async function checkTaskWithEplace(roleId: string, sid: string, taskType: number, oldEquip: EPlace, newEplace: EPlace, params?: any) {
let pushMessage = await taskUtil.checkTaskWithEplace(roleId, taskType, oldEquip, newEplace, params);
pushTaskUpdate(roleId, sid, pushMessage);
}
export async function checkTaskWithArgs(roleId: string, sid: string, taskType: number, args: number[]) {
let pushMessage = await taskUtil.checkTaskWithArgs(roleId, taskType, args);
@@ -300,12 +300,6 @@ export async function getPvpTask(roleId: string) {
return { taskList }
}
export async function checkTaskInPutJewel(roleId: string, sid: string, oldEplace: EPlace[], newEplace: EPlace[], ePlaceId: number, originJewel: JewelType, curJewel: JewelType) {
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_PUT_JEWEL, oldEplace, newEplace, [ePlaceId], { jewels: [originJewel, curJewel ] });
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_PUT_JEWEL_CNT, oldEplace, newEplace, [ePlaceId]);
await checkTaskWithEplaces(roleId, sid, TASK_TYPE.EQUIP_JEWEL_RANDSE_CNT, oldEplace, newEplace, [ePlaceId], { jewels: [originJewel, curJewel ] });
}
// 刷新每日任务
export async function refDailyTask(roleId: string, sid: string) {
let userTask = await UserTaskModel.findByRole(roleId);