✨ feat(聊天): 添加ur武将广播
This commit is contained in:
@@ -15,6 +15,7 @@ import { RoleModel, RoleType, RoleUpdate } from "../../db/Role";
|
||||
import { sendMessageToUserWithSuc } from "../pushService";
|
||||
import { checkTaskInCreateHero } from "../task/taskService";
|
||||
import { filterHeroes } from "../dataService";
|
||||
import { pushGetHero } from "../sysChatService";
|
||||
|
||||
/**
|
||||
* 创建多个武将
|
||||
@@ -71,6 +72,7 @@ import { filterHeroes } from "../dataService";
|
||||
for(let hero of heroes) {
|
||||
showHeroes.push(new HeroShowParam(hero));
|
||||
resultHeroes.push(hero);
|
||||
pushGetHero(roleId, roleName, serverId, hero);
|
||||
}
|
||||
|
||||
await SkinModel.insertSkins(roleId, roleName, skins);
|
||||
|
||||
@@ -18,11 +18,12 @@ export async function pushHeroQualityUpMsg(roleId: string, roleName: string, ser
|
||||
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>) {
|
||||
if (heroInfo.quality < HERO_INITIAL_QUALITY.ORANGE) {
|
||||
return;
|
||||
export async function pushGetHero(roleId: string, roleName: string, serverId: number | string, heroInfo: Partial<HeroType>) {
|
||||
if (heroInfo.quality == HERO_INITIAL_QUALITY.ORANGE) {
|
||||
await pushNormalHeroInfoBySource(roleId, roleName, serverId, MSG_SOURCE.GET_ORANGE_HERO, heroInfo);
|
||||
} else if(heroInfo.quality == HERO_INITIAL_QUALITY.UR){
|
||||
await pushNormalHeroInfoBySource(roleId, roleName, serverId, MSG_SOURCE.GET_UR_HERO, heroInfo);
|
||||
}
|
||||
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>) {
|
||||
|
||||
Reference in New Issue
Block a user