聊天:添加返回
This commit is contained in:
@@ -14,7 +14,7 @@ import { ITID, SPEICAL_ITEM, QUALITY_TYPE } from "../../../consts/constModules/i
|
||||
import { changeEquip, dressEquip, checkMaterialEnough, takeOffEquipAndCalPlayerCe } from "../../../services/equipService";
|
||||
|
||||
import { indexOf, findIndex } from 'underscore';
|
||||
import { pushEquipRefineSucMsg, pushNormalEquipMsg } from "../../../services/chatService";
|
||||
import { pushEquipRefineSucMsg, pushNormalEquipMsg, pushNormalItemMsg } from "../../../services/chatService";
|
||||
|
||||
export default function (app: Application) {
|
||||
return new EquipHandler(app);
|
||||
@@ -78,10 +78,10 @@ export class EquipHandler {
|
||||
let items = [{ id: gid, count: 1 }];
|
||||
let goods = await addItems(roleId, roleName, sid, items);
|
||||
if (targetGood.suitId) {
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.EQUIP_COMPOSE_SUIT, gid, targetGood.name);
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.EQUIP_COMPOSE_SUIT, gid, targetGood.name, targetGood.quality);
|
||||
}
|
||||
if (targetGood.quality >= QUALITY_TYPE.ORANGE) {
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.EQUIP_COMPOSE_ORANGE, gid, targetGood.name);
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.EQUIP_COMPOSE_ORANGE, gid, targetGood.name, targetGood.quality);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS, { goods });
|
||||
}
|
||||
@@ -229,7 +229,7 @@ export class EquipHandler {
|
||||
if (!curEplace) {
|
||||
return resResult(STATUS.ROLE_EQUIP_PLACE_NOT_ENOUGH);
|
||||
}
|
||||
let { lv, refineLv } = curEplace; // 强化等级,精炼等级,精炼次数
|
||||
let { lv, refineLv, equip } = curEplace; // 强化等级,精炼等级,精炼次数
|
||||
|
||||
if (lv < HERO_GROW_MAX.EQUIP_STRENGTHEN) {
|
||||
return resResult(STATUS.ROLE_EQUIP_NOT_REACH_MAX);
|
||||
@@ -277,7 +277,8 @@ export class EquipHandler {
|
||||
}
|
||||
|
||||
if (isSuccess) {
|
||||
pushEquipRefineSucMsg(roleId, roleName, serverId, curEplace);
|
||||
let curEquip = <EquipType>equip;
|
||||
pushEquipRefineSucMsg(roleId, roleName, serverId, curEplace, curEquip?curEquip.quality: 0);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS, { isSuccess, curHero });
|
||||
}
|
||||
@@ -552,7 +553,7 @@ export class EquipHandler {
|
||||
return resResult(STATUS.SUCCESS, { goods: result });
|
||||
|
||||
if (goodInfo.lvLimited >= JEWEL_PUSH_LV) {
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.JEWEL_COMPOSE, jewel, goodInfo.name);
|
||||
pushNormalItemMsg(roleId, roleName, serverId, MSG_SOURCE.JEWEL_COMPOSE, jewel, goodInfo.name);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
@@ -610,7 +611,7 @@ export class EquipHandler {
|
||||
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
|
||||
await addItems(roleId, roleName, sid, [{ id: jewel, count: count }]);
|
||||
if (goodInfo.lvLimited >= JEWEL_PUSH_LV) {
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.JEWEL_COMPOSE, jewel, goodInfo.name);
|
||||
pushNormalItemMsg(roleId, roleName, serverId, MSG_SOURCE.JEWEL_COMPOSE, jewel, goodInfo.name);
|
||||
}
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
@@ -669,7 +670,7 @@ export class EquipHandler {
|
||||
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
|
||||
|
||||
if (goodInfo.lvLimited >= JEWEL_PUSH_LV) {
|
||||
pushNormalEquipMsg(roleId, roleName, serverId, MSG_SOURCE.JEWEL_COMPOSE, jewel, goodInfo.name);
|
||||
pushNormalItemMsg(roleId, roleName, serverId, MSG_SOURCE.JEWEL_COMPOSE, jewel, goodInfo.name);
|
||||
}
|
||||
|
||||
let result = {};
|
||||
|
||||
Reference in New Issue
Block a user