装备:获得天晶石&合成装备

This commit is contained in:
luying
2022-02-15 15:36:49 +08:00
parent ecc55b3063
commit 465cc15e43
30 changed files with 506 additions and 283 deletions

View File

@@ -110,7 +110,7 @@ export class MailHandler {
let sid: string = session.get('sid');
let serverId: number = session.get('serverId');
let { id, type, mailType } = msg;
let { equipCount } = await RoleModel.findByRoleId(roleId, 'equipCount');
let { jewelCount } = await RoleModel.findByRoleId(roleId, 'jewelCount');
let originMails: {mailType: GM_MAIL_TYPE, mail: MailType|GroupMailType|ServerMailType}[] = []
@@ -156,7 +156,7 @@ export class MailHandler {
let mailGoods: ItemInter[] = [], mails: MailParam[] = [];
for(let { mail, mailType } of originMails) {
let { isEquipOver, equipCount: newEquipCount } = checkMailGoods(mail, equipCount);
let { isEquipOver, jewelCount: newEquipCount } = checkMailGoods(mail, jewelCount);
if(isEquipOver) {
if(type == RECEIVE_MAIL_TYPE.SINGLE) {
return resResult(STATUS.EQUIP_IS_OVER);
@@ -164,7 +164,7 @@ export class MailHandler {
continue; // 如果有装备数量超过,那么一键领取这条邮件就不领了
}
}
equipCount = newEquipCount;
jewelCount = newEquipCount;
if(mailType == GM_MAIL_TYPE.SINGLE) {
mail = await MailModel.updateStatusWithCondition(mail._id, MAIL_STATUS.RECEIVED);