Merge branch 'feature/hero' of gitlab.trgame.cn:zyztech/zyz_server

Conflicts:
	shared/consts/consts.ts
	shared/db/Role.ts
	web-server/app/service/Auth.ts
This commit is contained in:
luying
2020-12-14 11:17:02 +08:00
57 changed files with 18170 additions and 10511 deletions

View File

@@ -655,7 +655,7 @@ export class ComBattleHandler {
// 战斗胜利队长扣减藏宝图
if (result && teamStatus.capId != 'robot') {
let res = await ItemModel.decreaseItems(teamStatus.capId, [{id: teamStatus.blueprtId, count: 1}]);
if (!res) return resResult(STATUS.COM_BATTLE_BLUEPRT_NOT_ENOUGH);
if (res.hasError) return resResult(STATUS.COM_BATTLE_BLUEPRT_NOT_ENOUGH);
}
channel.pushMessage('onTeamComplete', {teamCode, result});
this.teamMap.delete(teamCode);
@@ -819,7 +819,7 @@ export class ComBattleHandler {
});
// 消耗藏宝图和寻宝币
const rec = await ItemModel.decreaseItems(roleId, original);
if(!rec) {
if(rec.hasError) {
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
}