活动:添加新任务类型
This commit is contained in:
@@ -111,6 +111,7 @@ export async function checkTaskInBattleEnd(serverId: number, roleId: string, sid
|
||||
//成长任务
|
||||
await checkActivityTask(serverId, sid, funcs, roleId, TASK_TYPE.BATTLE_MAIN, 1, { warId: battleId })
|
||||
await checkActivityTask(serverId, sid, funcs, roleId, TASK_TYPE.BATTLE_EXPEDITION, 1)
|
||||
await checkActivityTask(serverId, sid, funcs, roleId, TASK_TYPE.BATTLE_DUNGEON_WAR, 1, { warId: battleId })
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,23 @@ export async function treasureHuntActivity(serverId: number, roleId: string) {
|
||||
if (!activityData) {
|
||||
return null;
|
||||
}
|
||||
let playerData = await getPlayerTreasureHuntData(activityData.activityId, serverId, roleId, huntRoundIndex, huntBeginTime, huntEndTime);
|
||||
return playerData
|
||||
|
||||
let playerData = new TreasureHuntData(activityData);
|
||||
playerData.beginTime = moment(huntBeginTime).valueOf();
|
||||
playerData.endTime = moment(huntEndTime).valueOf();
|
||||
playerData.todayIndex = deltaDays(moment(huntBeginTime).startOf('d').toDate(), new Date) + 1;;
|
||||
playerData.roundIndex = huntRoundIndex;
|
||||
|
||||
let playerTreasureFirstPageecord: ActivityTreasureHuntFirstPageModelType = await ActivityTreasureHuntFirstPageModel.findData(serverId, activityData.activityId, roleId, huntRoundIndex);
|
||||
playerData.firstPage.setPlayerFirstPageRecord(playerTreasureFirstPageecord);
|
||||
let playerShopRecord: ActivityTreasureHuntShopModelType = await ActivityTreasureHuntShopModel.findTreasureData(activityData.activityId, roleId, huntRoundIndex, playerData.todayIndex);
|
||||
playerData.shop.setPlayerShopRecords(playerShopRecord);
|
||||
let playerTaskRecord: ActivityTreasureHuntTaskModelType[] = await ActivityTreasureHuntTaskModel.findDataByRoundIndex(serverId, activityData.activityId, roleId, huntRoundIndex);
|
||||
playerData.tasks.setPlayerTaskRecords(playerTaskRecord);
|
||||
let playerTreasureShopRecord: ActivityTreasureHuntTreasureShopModelType = await ActivityTreasureHuntTreasureShopModel.findData(activityData.activityId, roleId, huntRoundIndex);
|
||||
playerData.treasureShop.setPlayerTreasureShopRecords(playerTreasureShopRecord);
|
||||
|
||||
return playerData;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user