🐞 fix(活动): 修复宴请百家头像数字
This commit is contained in:
@@ -79,18 +79,19 @@ export class EntertainHandler {
|
|||||||
|
|
||||||
let playerRecord = await ActivityEntertainRecModel.record(serverId, activityId, playerData.roundIndex, roleId, { todayIndex, id: randResult.id, hid: randResult.hid, index: randResult.index, time: new Date(), reward: randResult.reward })
|
let playerRecord = await ActivityEntertainRecModel.record(serverId, activityId, playerData.roundIndex, roleId, { todayIndex, id: randResult.id, hid: randResult.hid, index: randResult.index, time: new Date(), reward: randResult.reward })
|
||||||
let { goods } = await addReward(roleId, roleName, sid, serverId, rewards, ITEM_CHANGE_REASON.ACT_ENTERTAIN);
|
let { goods } = await addReward(roleId, roleName, sid, serverId, rewards, ITEM_CHANGE_REASON.ACT_ENTERTAIN);
|
||||||
randResult.incNum();
|
|
||||||
playerData.todayPlayCnt = 0;
|
playerData.todayPlayCnt = 0;
|
||||||
playerData.playCnt = 0;
|
playerData.playCnt = 0;
|
||||||
playerData.freeCnt = playerData.freeCntDaily * playerData.todayIndex;
|
playerData.freeCnt = playerData.freeCntDaily * playerData.todayIndex;
|
||||||
playerData.setPlayerRecords(playerRecord)
|
for(let hero of playerData.heroes) hero.num = 0;
|
||||||
|
playerData.setPlayerRecords(playerRecord);
|
||||||
|
let newRandResult = playerData.heroes.find(cur => cur.id == randResult.id);
|
||||||
|
|
||||||
return resResult(STATUS.SUCCESS, {
|
return resResult(STATUS.SUCCESS, {
|
||||||
activityId,
|
activityId,
|
||||||
todayPlayCnt: playerData.todayPlayCnt,
|
todayPlayCnt: playerData.todayPlayCnt,
|
||||||
playCnt: playerData.playCnt,
|
playCnt: playerData.playCnt,
|
||||||
freeCnt: playerData.freeCnt,
|
freeCnt: playerData.freeCnt,
|
||||||
curHero: randResult.getShowResult(),
|
curHero: newRandResult?.getShowResult(),
|
||||||
goods
|
goods
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user