addItem goodType修改

This commit is contained in:
luying
2020-12-18 17:13:49 +08:00
parent f2c124a6e4
commit 623e760005
13 changed files with 187 additions and 242 deletions
@@ -210,6 +210,7 @@ export class ExpeditionBattleHandler {
const { expeditionCode, battleCode, battleId, expeditionId, isSuccess, heroes, star, enemies } = msg;
let roleId = session.get('roleId');
let roleName = session.get('roleName');
let sid = session.get('sid');
let warInfo = getWarById(battleId);
if(!warInfo) {
@@ -259,7 +260,7 @@ export class ExpeditionBattleHandler {
let { expeditionPoint = 0 } = role;
// 关卡奖励
let warReward = new WarReward(roleId, roleName, battleId, isSuccess);
let warReward = new WarReward(roleId, roleName, sid, battleId, isSuccess);
let reward = await warReward.saveReward(1);
let actordata = await roleLevelup(roleId, isSuccess?warInfo.kingExp:0, this.app, session);// 主公升级经验
@@ -272,7 +273,7 @@ export class ExpeditionBattleHandler {
expeditionCode, expeditionId,
battleCode, battleId,
battleStatus: expeditionWarRecord.battleStatus,
...reward,
goods: reward,
apJson,
expeditionPoint,
...actordata
@@ -288,6 +289,7 @@ export class ExpeditionBattleHandler {
const { point } = msg;
let roleId = session.get('roleId');
let roleName = session.get('roleName');
let sid = session.get('sid');
let role = await RoleModel.findByRoleId(roleId);
let {expeditionPoint} = role;
@@ -325,12 +327,12 @@ export class ExpeditionBattleHandler {
}
let pointRewards = await getPointRewardStatus(roleId);
let goods = await handleFixedReward(roleId, roleName, curDicExpeditionPoint.reward, 1);
let goods = await handleFixedReward(roleId, roleName, sid, curDicExpeditionPoint.reward, 1);
return resResult(STATUS.SUCCESS, {
costPoint: hasReceivedAll?maxPoint: 0,
pointRewards,
...goods
goods
})
}