聊天:修复部分系统消息推送触发
This commit is contained in:
@@ -535,6 +535,7 @@ export class EquipHandler {
|
||||
let { count, consumes, jewel, type } = msg;
|
||||
let roleId: string = session.get('roleId');
|
||||
let roleName: string = session.get('roleName');
|
||||
let serverId: number = session.get('serverId');
|
||||
let sid: string = session.get('sid');
|
||||
let goodInfo = getGoodById(jewel);
|
||||
let good = ITID.get(goodInfo.itid);
|
||||
@@ -549,6 +550,10 @@ export class EquipHandler {
|
||||
let result = await addItems(roleId, roleName, sid, [{ id: jewel, count: count }]);
|
||||
if (type == 1)
|
||||
return resResult(STATUS.SUCCESS, { goods: result });
|
||||
|
||||
if (goodInfo.lvLimited >= JEWEL_PUSH_LV) {
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.JEWEL_COMPOSE, jewel, goodInfo.name);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
@@ -635,6 +640,7 @@ export class EquipHandler {
|
||||
let roleId: string = session.get('roleId');
|
||||
let roleName: string = session.get('roleName');
|
||||
let sid: string = session.get('sid');
|
||||
let serverId = session.get('serverId');
|
||||
let goodInfo = getGoodById(jewel);
|
||||
let good = ITID.get(goodInfo.itid);
|
||||
let needUpdate = false;
|
||||
@@ -661,6 +667,11 @@ export class EquipHandler {
|
||||
let hasError = await decreaseItems(roleId, sid, consumes);//检查是消耗是否足够
|
||||
if (!!hasError)
|
||||
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
|
||||
|
||||
if (goodInfo.lvLimited >= JEWEL_PUSH_LV) {
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.JEWEL_COMPOSE, jewel, goodInfo.name);
|
||||
}
|
||||
|
||||
let result = {};
|
||||
if (needUpdate) {
|
||||
//穿戴宝石
|
||||
|
||||
Reference in New Issue
Block a user