物品增加掉落

This commit is contained in:
mamengke01
2020-12-16 16:16:20 +08:00
parent d822f6b819
commit 829d43c7a8
8 changed files with 176 additions and 25770 deletions
@@ -1,5 +1,5 @@
import {Application, BackendSession, createTcpMailBox, ChannelService} from 'pinus';
import { handleCost } from '../../../services/rewardService';
import { handleCost, addItems } from '../../../services/rewardService';
import { calPlayerCeAndSave, getAllAttrStage } from '../../../services/playerCeService';
import { resResult } from '../../../pubUtils/util';
import { STATUS } from '../../../consts/statusCode';
@@ -27,11 +27,12 @@ export class HeroHandler {
let {id, count} = msg;
let result = await handleCost(roleId, sid, [{id, count}] );
//let result = await handleCost(roleId, sid, [{id, count}] );
let result = await addItems(roleId, roleName, sid, [{id, count}] );
if(!result) {
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
}
return resResult(STATUS.SUCCESS);
return resResult(STATUS.SUCCESS,{result});
}
@@ -448,5 +449,4 @@ export class HeroHandler {
await calPlayerCeAndSave(sid, roleId, [hero], HERO_SYSTEM_TYPE.SKIN, [id, lastSkinId]);
return resResult(STATUS.SUCCESS, {curHero: {hid : hero.hid, skins : hero.skins} });
}
}