diff --git a/game-server/app/servers/role/handler/heroHandler.ts b/game-server/app/servers/role/handler/heroHandler.ts index 0b4ea88e2..a07c4b0be 100644 --- a/game-server/app/servers/role/handler/heroHandler.ts +++ b/game-server/app/servers/role/handler/heroHandler.ts @@ -9,7 +9,7 @@ import { ItemModel } from '../../../db/Item'; import { gameData, getHeroExpByLv, getHeroStarByQuality, getHeroWakeByQuality, getHeroLvByExp, getMaxGradeByjobClass, getJobByGradeAndClass, getConnectLvByExp, getEquipByJobClassAndEPlace, getScollByStar, getExpByLv, getConnectMaxLv, getFriendShipByIdAndLv } from '../../../pubUtils/data'; import { ItemInter, RewardInter } from '../../../pubUtils/interface'; import { getDropItems, FIGURE_UNLOCK_CONDITION, ITID } from '../../../consts/constModules/itemConst' -import { pushComposeOrangeHero, pushHeroQualityUpMsg, pushHeroStarMax, pushHeroWakeUp } from '../../../services/chatService'; +import { pushHeroStarMax, pushHeroWakeUp } from '../../../services/chatService'; import { PvpDefenseModel } from '../../../db/PvpDefense'; import { checkTask, checkTaskInHeroGiveFavor, checkTaskInHeroQUalityUp, checkTaskInHeroStarUp, checkTaskInHeroTrain, checkTaskInHeroWakeUp } from '../../../services/task/taskService'; import { isNumber, pick } from 'underscore'; @@ -60,7 +60,6 @@ export class HeroHandler { // createHero let { heroes, resultHeroes } = await createHero(roleId, roleName, sid, serverId, { hid, count: 1 }); - pushComposeOrangeHero(roleId, roleName, serverId, resultHeroes[0]); return resResult(STATUS.SUCCESS, { curHero: {hid}, addHeros: heroes }); } diff --git a/game-server/app/services/role/createHero.ts b/game-server/app/services/role/createHero.ts index 8754e06dc..ac0d4c0a4 100644 --- a/game-server/app/services/role/createHero.ts +++ b/game-server/app/services/role/createHero.ts @@ -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); diff --git a/game-server/app/services/sysChatService.ts b/game-server/app/services/sysChatService.ts index a6d618996..373e89e30 100644 --- a/game-server/app/services/sysChatService.ts +++ b/game-server/app/services/sysChatService.ts @@ -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) { - if (heroInfo.quality < HERO_INITIAL_QUALITY.ORANGE) { - return; +export async function pushGetHero(roleId: string, roleName: string, serverId: number | string, heroInfo: Partial) { + 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) { diff --git a/shared/consts/constModules/chatConst.ts b/shared/consts/constModules/chatConst.ts index a2bd06988..0c74df5c8 100644 --- a/shared/consts/constModules/chatConst.ts +++ b/shared/consts/constModules/chatConst.ts @@ -58,7 +58,7 @@ export const MSG_SOURCE = { PRIVATE_SEND_GIFT: 1, TEAM_ROLE: 2, HERO_QUALITY_UP: 3, - COMPOSE_ORANGE_HERO: 4, + GET_ORANGE_HERO: 4, HERO_STAR_MAX: 5, GUILD_NOTICE: 6, GUILD_STRUCTURE_LV_UP: 7, @@ -82,6 +82,7 @@ export const MSG_SOURCE = { EQUIP_STAR_UP: 25, EQUIP_QUALITY_UP: 26, LADDER_FIRST_CHANGE: 27, + GET_UR_HERO: 28, } export const DEFAULT_MSG_PER_PAGE = 10; diff --git a/shared/consts/constModules/heroConst.ts b/shared/consts/constModules/heroConst.ts index 85ed9ad50..cc91b2ee8 100644 --- a/shared/consts/constModules/heroConst.ts +++ b/shared/consts/constModules/heroConst.ts @@ -56,7 +56,8 @@ export const HERO_SUB_ATTR_RATIO = 1000; export const HERO_INITIAL_QUALITY = { BLUE: 1, PURPLE: 2, - ORANGE: 3 + ORANGE: 3, + UR: 4, } export const CHECK_HERO_CONSUME = true; \ No newline at end of file diff --git a/shared/resource/jsons/dic_zyz_chat_system.json b/shared/resource/jsons/dic_zyz_chat_system.json index c91d1b3d5..667abf6f1 100644 --- a/shared/resource/jsons/dic_zyz_chat_system.json +++ b/shared/resource/jsons/dic_zyz_chat_system.json @@ -41,7 +41,7 @@ }, { "id": 4, - "name": "COMPOSE_ORANGE_HERO", + "name": "GET_ORANGE_HERO", "mean": "玩家获得传奇武将(橙)", "type": "1&", "template": "恭喜%d时来运转,获得传奇武将%d", @@ -94,8 +94,8 @@ "name": "GUILD_BOSS_SUC", "mean": "军团BOSS胜利", "type": "3&", - "template": "恭喜主公,军团BOSS%d被成功压制,拍卖行即将开启", - "worldchat": "恭喜各位小主公,军团BOSS%d被成功压制,拍卖行即将开启", + "template": "恭喜主公,军团BOSS%d被成功压制,海量拍品已加入拍卖行", + "worldchat": "恭喜各位小主公,军团BOSS%d被成功压制,海量拍品已加入拍卖行", "bubble": "恭喜各位小主公,军团BOSS%d被成功压制,拍卖行即将开启", "comments": "1:%d(BOSS名)" }, @@ -278,5 +278,15 @@ "worldchat": "恭喜%d,在名将擂台中攻擂成功,登顶第一", "bubble": "恭喜%d,在名将擂台中攻擂成功,登顶第一", "comments": "1:%d(玩家名)" + }, + { + "id": 28, + "name": "GET_UR_HERO", + "mean": "玩家获得神话武将(ur)", + "type": "1&", + "template": "恭喜%d时来运转,获得神话武将%d", + "worldchat": "恭喜%d时来运转,获得神话武将%d", + "bubble": "恭喜%d时来运转,获得神话武将%d", + "comments": "1:%d(玩家名);2:%d(武将名)" } ] \ No newline at end of file