🐞 fix(后台): 道具变化原因
This commit is contained in:
@@ -65,7 +65,7 @@ export class EntertainHandler {
|
||||
|
||||
let rewards = stringToRewardParam(randResult.reward);
|
||||
let playerRecord = await ActivityEntertainRecModel.record(serverId, activityId, playerData.roundIndex, roleId, { todayIndex: playerData.todayIndex, id: randResult.id, hid: randResult.hid, time: new Date(), reward: randResult.reward })
|
||||
let { goods } = await addReward(roleId, roleName, sid, serverId, rewards, ITEM_CHANGE_REASON.ACT_DRAGON_BOAT);
|
||||
let { goods } = await addReward(roleId, roleName, sid, serverId, rewards, ITEM_CHANGE_REASON.ACT_ENTERTAIN);
|
||||
randResult.incNum();
|
||||
playerData.updateBuyCnt(playerRecord);
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
@@ -96,7 +96,7 @@ export class EntertainHandler {
|
||||
if(playerData.buyCnt + count > playerData.maxBuyCnt) return resResult(STATUS.ACTIVITY_ENTERTAIN_BUY_COUNT_OVER);
|
||||
if(playerData.todayPlayCnt < playerData.freeCnt) return resResult(STATUS.ACTIVITY_DRAGON_BOAT_CANNOT_BUY);
|
||||
// 扣材料
|
||||
let costResult = await handleCost(roleId, sid, stringToConsumeParam(playerData.buyCost), ITEM_CHANGE_REASON.ACT_DRAGON_BOAT_BUY_COST);
|
||||
let costResult = await handleCost(roleId, sid, stringToConsumeParam(playerData.buyCost), ITEM_CHANGE_REASON.ACT_ENTERTAIN_BUY_COST);
|
||||
if(!costResult) return resResult(STATUS.ROLE_MATERIAL_NOT_ENOUGH);
|
||||
|
||||
// 保存数据
|
||||
|
||||
Reference in New Issue
Block a user