装备:全服公告
This commit is contained in:
@@ -14,6 +14,7 @@ import { isNumber, pick } from 'underscore';
|
||||
import { JewelModel } from "../../../db/Jewel";
|
||||
import { getJewelRandSe } from "../../../pubUtils/itemUtils";
|
||||
import { checkTaskInEquipQualityUp, checkTaskInEquipStarUp, checkTaskInPutJewel, checkTaskInPutStone } from '../../../services/equipService';
|
||||
import { pushEquipQualityMax, pushEquipStarMax } from "../../../services/sysChatService";
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -156,7 +157,7 @@ export class EquipHandler {
|
||||
// 装备升品
|
||||
public async qualityUp(msg: { hid: number, ePlaceId: number, isOneClick: boolean }, session: BackendSession) {
|
||||
let roleId: string = session.get('roleId');
|
||||
// let roleName: string = session.get('roleName');
|
||||
let roleName: string = session.get('roleName');
|
||||
const serverId = session.get('serverId');
|
||||
let sid: string = session.get('sid');
|
||||
|
||||
@@ -202,10 +203,11 @@ export class EquipHandler {
|
||||
|
||||
let isUpQuality = update.quality != curEquip.quality;
|
||||
|
||||
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, update);
|
||||
let { newEplace, updatedEplace, newEquip } = updateEplace(oldEplace, ePlaceId, update);
|
||||
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_QUALITY, sid, roleId, hero, { ePlace: newEplace }, [ePlaceId]);
|
||||
|
||||
await checkTaskInEquipQualityUp(serverId, roleId, sid, oldEplace, newEplace, ePlaceId, hid, isUpQuality);
|
||||
pushEquipQualityMax(roleId, roleName, serverId, hid, newEquip, isUpQuality);
|
||||
const curHero = {
|
||||
hid,
|
||||
isUpQuality,
|
||||
@@ -218,7 +220,7 @@ export class EquipHandler {
|
||||
// 装备升星
|
||||
public async starUp(msg: { hid: number, ePlaceId: number, isOneClick: boolean }, session: BackendSession) {
|
||||
let roleId: string = session.get('roleId');
|
||||
// let roleName: string = session.get('roleName');
|
||||
let roleName: string = session.get('roleName');
|
||||
const serverId = session.get('serverId');
|
||||
let sid: string = session.get('sid');
|
||||
|
||||
@@ -272,10 +274,11 @@ export class EquipHandler {
|
||||
let result = await handleCost(roleId, sid, consumes, ITEM_CHANGE_REASON.EQUIP_STARUP);
|
||||
if (!result) return resResult(STATUS.ROLE_MATERIAL_NOT_ENOUGH);
|
||||
|
||||
let { newEplace, updatedEplace } = updateEplace(oldEplace, ePlaceId, update);
|
||||
let { newEplace, updatedEplace, newEquip } = updateEplace(oldEplace, ePlaceId, update);
|
||||
hero = await calPlayerCeAndSave(HERO_SYSTEM_TYPE.EQUIP_STAR, sid, roleId, hero, { ePlace: newEplace }, [ePlaceId]);
|
||||
|
||||
await checkTaskInEquipStarUp(serverId, roleId, sid, oldEplace, newEplace, ePlaceId, hid, isUpStar);
|
||||
pushEquipStarMax(roleId, roleName, serverId, hid, newEquip, isUpStar);
|
||||
|
||||
const curHero = {
|
||||
hid,
|
||||
|
||||
Reference in New Issue
Block a user