寻宝:一键邀请发送世界消息和测试
This commit is contained in:
@@ -21,7 +21,7 @@ import { setAp } from '../../../services/actionPointService';
|
||||
import { roleLevelup } from '../../../services/normalBattleService';
|
||||
import { addUserToChannel } from '../../../services/roleService';
|
||||
import { ChannelUser } from '../../../domain/ChannelUser';
|
||||
import { pushComBtlTeamMsg, pushNormalEquipMsg } from '../../../services/chatService';
|
||||
import { pushComBtlTeamMsg, pushNormalEquipMsg, pushTeamInviteMsg } from '../../../services/chatService';
|
||||
|
||||
export default function(app: Application) {
|
||||
return new ComBattleHandler(app);
|
||||
@@ -656,13 +656,29 @@ export class ComBattleHandler {
|
||||
let roleName = session.get('roleName');
|
||||
|
||||
const { teamCode, type, content, targetRoleId, targetMsgCode } = msg;
|
||||
const result = await pushComBtlTeamMsg(teamCode, roleId, roleName, type, MSG_SOURCE.TEAM, content, targetRoleId, targetMsgCode);
|
||||
const result = await pushComBtlTeamMsg(teamCode, roleId, roleName, type, MSG_SOURCE.TEAM_ROLE, content, targetRoleId, targetMsgCode);
|
||||
if (!result) {
|
||||
return resResult(STATUS.WRONG_PARMS);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 一键邀请,自动在世界频道发送消息
|
||||
* @param {{ teamCode: string }} msg
|
||||
* @param {BackendSession} session
|
||||
* @memberof ComBattleHandler
|
||||
*/
|
||||
async autoInvite(msg: { teamCode: string }, session: BackendSession) {
|
||||
let roleId = session.get('roleId');
|
||||
let roleName = session.get('roleName');
|
||||
let serverId = session.get('serverId');
|
||||
const { teamCode } = msg;
|
||||
const msgData = await pushTeamInviteMsg(roleId, roleName, serverId, teamCode);
|
||||
if (!msgData) return resResult(STATUS.WRONG_PARMS);
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 藏宝图合成
|
||||
* @param {{original: Array<{id: number, count: number}>}} msg
|
||||
|
||||
Reference in New Issue
Block a user