聊天:获得橙色武将推送系统消息
测试:增加删除武将等测试接口
This commit is contained in:
@@ -203,10 +203,18 @@ export function wrapRichText(type: string, jumpTo: string, content: string, parm
|
||||
});
|
||||
}
|
||||
|
||||
export async function pushHeroQualityUpMsg(roleId: string, roleName: string, serverId: number | string, heroInfo: Partial<HeroType>) {
|
||||
export async function pushNormalHeroInfoBySource(roleId: string, roleName: string, serverId: number | string, source: number, heroInfo: Partial<HeroType>) {
|
||||
const hero = pick(heroInfo, ['hName', 'hid', 'seqId', 'quality']);
|
||||
const content = JSON.stringify({ roleId, roleName, hero });
|
||||
const msgData = await createGroupMsg(roleId, roleName, CHANNEL_PREFIX.SYS, `${serverId}`, MSG_TYPE.RICH_TEXT, MSG_SOURCE.HERO_QUALITY_UP, content, null, null);
|
||||
const msgData = await createGroupMsg(roleId, roleName, CHANNEL_PREFIX.SYS, `${serverId}`, MSG_TYPE.RICH_TEXT, source, content, null, null);
|
||||
const roomId = groupRoomId(CHANNEL_PREFIX.SYS, `${serverId}`);
|
||||
await pushGroupMsgToRoom(roomId, msgData);
|
||||
}
|
||||
|
||||
export async function pushHeroQualityUpMsg(roleId: string, roleName: string, serverId: number | string, heroInfo: Partial<HeroType>) {
|
||||
await pushNormalHeroInfoBySource(roleId, roleName, serverId, MSG_SOURCE.HERO_QUALITY_UP, heroInfo);
|
||||
}
|
||||
|
||||
export async function pushComposeOrangeHero(roleId: string, roleName: string, serverId: number | string, heroInfo: Partial<HeroType>) {
|
||||
await pushNormalHeroInfoBySource(roleId, roleName, serverId, MSG_SOURCE.COMPOSE_ORANGE_HERO, heroInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user