This commit is contained in:
mamengke01
2020-12-24 10:06:12 +08:00
parent 50e1e98daf
commit cc1a91ed09
5 changed files with 175 additions and 89 deletions

View File

@@ -21,14 +21,14 @@ export class HeroHandler {
private channelService: ChannelService = this.app.get('channelService');
public async test(msg: { id: number, count: number, seqId:number, type:number}, session: BackendSession) {
public async test(msg: { items:Array<{id: number, count: number, seqId:number, type:number}>}, session: BackendSession) {
let roleId: string = session.get('roleId');
let roleName: string = session.get('roleName');
let sid: string = session.get('sid');
let {id, count, seqId, type} = msg;
let {items} = msg;
let result = await handleCost(roleId, sid, [{id, count, seqId, type}] );
let result = await handleCost(roleId, sid, items );
//let result = await addItems(roleId, roleName, sid, [{id, count}] );
if(!result) {
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);