活动:寻宝骑兵挑战消耗扣减修改
This commit is contained in:
@@ -237,7 +237,7 @@ export class NormalBattleHandler {
|
||||
}
|
||||
} else if (warInfo.warType == WAR_TYPE.ACT_TREASURE_HUNT) {
|
||||
if(isSuccess) {
|
||||
await treasureHuntChallengeConsume(roleId, sid, activityId);
|
||||
await treasureHuntChallengeConsume(serverId, roleId, sid);
|
||||
}
|
||||
}
|
||||
let curWarStar = warStar.find(cur => cur.id == battleId);
|
||||
|
||||
@@ -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;
|
||||
//消耗资源
|
||||
|
||||
Reference in New Issue
Block a user