聊天:升星和升品的推送及测试

This commit is contained in:
liangtongchuan
2021-03-08 21:23:42 +08:00
parent 6c51d0b79d
commit 92006fc886
4 changed files with 122 additions and 7 deletions
+5 -1
View File
@@ -204,7 +204,7 @@ export function wrapRichText(type: string, jumpTo: string, content: string, parm
}
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 hero = pick(heroInfo, ['hName', 'hid', 'seqId', 'quality', 'star', 'starStage', 'colorStar', 'colorStarStage']);
const content = JSON.stringify({ roleId, roleName, hero });
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}`);
@@ -218,3 +218,7 @@ export async function pushHeroQualityUpMsg(roleId: string, roleName: string, ser
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);
}
export async function pushHeroStarMax(roleId: string, roleName: string, serverId: number | string, heroInfo: Partial<HeroType>) {
await pushNormalHeroInfoBySource(roleId, roleName, serverId, MSG_SOURCE.HERO_STAR_MAX, heroInfo);
}