From 46dfdadea2042f8a53e004eb786008c425fa26ea Mon Sep 17 00:00:00 2001 From: luying Date: Tue, 25 Jul 2023 16:41:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E5=B9=BF=E6=92=AD):=20?= =?UTF-8?q?=E8=A3=85=E5=A4=87=E5=8D=87=E5=93=81=E5=B9=BF=E6=92=AD=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/sysChatService.ts | 19 ++++++++++++++----- shared/consts/constModules/chatConst.ts | 1 + shared/consts/constModules/heroConst.ts | 1 + 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/game-server/app/services/sysChatService.ts b/game-server/app/services/sysChatService.ts index 373e89e30..779184cdd 100644 --- a/game-server/app/services/sysChatService.ts +++ b/game-server/app/services/sysChatService.ts @@ -6,6 +6,7 @@ import { pick } from 'lodash'; import { isString } from 'underscore'; import { BossInstanceType } from '../db/BossInstance'; import { GroupMessageType } from '../db/GroupMessage'; +import { HERO } from '../pubUtils/dicParam'; async function pushNormalHeroInfoBySource(roleId: string, roleName: string, serverId: number | string, source: number, heroInfo: Partial) { const hero = pick(heroInfo, ['hName', 'hid', 'seqId', 'quality', 'star', 'starStage', 'colorStar', 'colorStarStage']); @@ -51,12 +52,20 @@ export async function pushEquipStarMax(roleId: string, roleName: string, serverI // 装备升品到金色 export async function pushEquipQualityMax(roleId: string, roleName: string, serverId: number, hid: number, equip: EPlace, isUpQuality: boolean) { const { id, equipId, star, quality, } = equip; - if(!isUpQuality || quality != HERO_GROW_MAX.EQUIP_QUALITY) return; + if(isUpQuality && quality == HERO_GROW_MAX.EQUIP_QUALITY) { + const content = JSON.stringify({ roleId, roleName, hid, eplaceId: id, equipId, star, quality }); + const msgData = await createGroupMsg(roleId, roleName, CHANNEL_PREFIX.SYS, `${serverId}`, MSG_TYPE.RICH_TEXT, MSG_SOURCE.EQUIP_QUALITY_UP, content, null, null); + await pushGroupMsgToRoom(msgData); + return msgData; + } + if(isUpQuality && quality == HERO_GROW_MAX.EQUIP_QUALITY_TO_6) { + const content = JSON.stringify({ roleId, roleName, hid, eplaceId: id, equipId, star, quality }); + const msgData = await createGroupMsg(roleId, roleName, CHANNEL_PREFIX.SYS, `${serverId}`, MSG_TYPE.RICH_TEXT, MSG_SOURCE.EQUIP_QUALITY_TO_6, content, null, null); + await pushGroupMsgToRoom(msgData); + return msgData; + + } - const content = JSON.stringify({ roleId, roleName, hid, eplaceId: id, equipId, star, quality }); - const msgData = await createGroupMsg(roleId, roleName, CHANNEL_PREFIX.SYS, `${serverId}`, MSG_TYPE.RICH_TEXT, MSG_SOURCE.EQUIP_QUALITY_UP, content, null, null); - await pushGroupMsgToRoom(msgData); - return msgData; } export async function pushPresent(roleId: string, roleName: string, serverId: number | string, toRoleName: string, id: number) { diff --git a/shared/consts/constModules/chatConst.ts b/shared/consts/constModules/chatConst.ts index e87bf858d..11fdb4db6 100644 --- a/shared/consts/constModules/chatConst.ts +++ b/shared/consts/constModules/chatConst.ts @@ -99,6 +99,7 @@ export const MSG_SOURCE = { GVG_TECH_UNLOCK: 33, GVG_VESTIGE_ACCOUNT: 34, GVG_OCCUPY_CITY: 35, + EQUIP_QUALITY_TO_6: 36, } export const DEFAULT_MSG_PER_PAGE = 10; diff --git a/shared/consts/constModules/heroConst.ts b/shared/consts/constModules/heroConst.ts index d9d2b3610..ca2bee047 100644 --- a/shared/consts/constModules/heroConst.ts +++ b/shared/consts/constModules/heroConst.ts @@ -51,6 +51,7 @@ export const HERO_GROW_MAX = { QUALITY: 3, EQUIP_STAR: 12, EQUIP_QUALITY: 5, + EQUIP_QUALITY_TO_6: 6, } export const JOB_TYPE = {