活动:寻宝骑兵挑战消耗扣减修改
This commit is contained in:
@@ -237,7 +237,7 @@ export class NormalBattleHandler {
|
|||||||
}
|
}
|
||||||
} else if (warInfo.warType == WAR_TYPE.ACT_TREASURE_HUNT) {
|
} else if (warInfo.warType == WAR_TYPE.ACT_TREASURE_HUNT) {
|
||||||
if(isSuccess) {
|
if(isSuccess) {
|
||||||
await treasureHuntChallengeConsume(roleId, sid, activityId);
|
await treasureHuntChallengeConsume(serverId, roleId, sid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let curWarStar = warStar.find(cur => cur.id == battleId);
|
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) {
|
export async function treasureHuntChallengeConsume(serverId: number, roleId: string, sid: string) {
|
||||||
|
let { huntActivityId, huntBeginTime, huntEndTime, huntRoundIndex, activityData } = await getTreasureHuntData(serverId, roleId);
|
||||||
let activityData: ActivityModelType = await getActivityById(activityId);
|
if (!activityData) {
|
||||||
let playerData = new TreasureHuntData(activityData, 0, 0);
|
return false;
|
||||||
|
}
|
||||||
|
let playerData = await getPlayerTreasureHuntChallengeData(huntActivityId, serverId, roleId, huntRoundIndex, huntBeginTime, huntEndTime,);
|
||||||
|
if (!playerData) return false;
|
||||||
|
|
||||||
let challengeData = playerData.challenge;
|
let challengeData = playerData.challenge;
|
||||||
//消耗资源
|
//消耗资源
|
||||||
|
|||||||
Reference in New Issue
Block a user