活动:寻宝骑兵挑战消耗扣减修改

This commit is contained in:
luying
2022-04-14 15:03:40 +08:00
parent 722da7aae7
commit c26db282ff
2 changed files with 8 additions and 5 deletions

View File

@@ -359,10 +359,13 @@ export async function makeShop(roleId: string, roleName: string, sid: string, se
}
}
export async function treasureHuntChallengeConsume(roleId: string, sid: string, activityId: number) {
let activityData: ActivityModelType = await getActivityById(activityId);
let playerData = new TreasureHuntData(activityData, 0, 0);
export async function treasureHuntChallengeConsume(serverId: number, roleId: string, sid: string) {
let { huntActivityId, huntBeginTime, huntEndTime, huntRoundIndex, activityData } = await getTreasureHuntData(serverId, roleId);
if (!activityData) {
return false;
}
let playerData = await getPlayerTreasureHuntChallengeData(huntActivityId, serverId, roleId, huntRoundIndex, huntBeginTime, huntEndTime,);
if (!playerData) return false;
let challengeData = playerData.challenge;
//消耗资源