全局修改:topFive字段

This commit is contained in:
luying
2021-02-24 13:23:55 +08:00
parent 47c3c093f2
commit 56efab8cb7
17 changed files with 224 additions and 224 deletions

View File

@@ -24,7 +24,7 @@ import { STATUS, HERO_SYSTEM_TYPE } from '@consts';
import { ITID, COUNTER } from '@consts';
import { ItemModel } from '@db/Item';
import { gameData, getHeroExpByLv } from '@pubUtils/data';
import { calPlayerCeAndSave, calculateTopFive, calEquipSeids } from '@pubUtils/playerCe';
import { calPlayerCeAndSave, calculatetopLineup, calEquipSeids } from '@pubUtils/playerCe';
import { SchoolModel } from '@db/School';
import { CeAttrNumber } from '@domain/roleField/attribute';
import { smsModel } from '@db/Sms';
@@ -517,9 +517,9 @@ export default class GMUsers extends Service {
if (!hero) continue;
await HeroModel.deleteHero(roleId, hid);
let role = await RoleModel.findByRoleId(roleId);
await calculateTopFive(role, hid, 0, null);
await calculatetopLineup(role, hid, 0, null);
await PvpDefenseModel.deleteHero(roleId, hid);
await RoleModel.updateRoleInfo(roleId, { topFive: role.topFive, topFiveCe: role.topFiveCe, ce: role.ce - hero.ce });
await RoleModel.updateRoleInfo(roleId, { topLineup: role.topLineup, topLineupCe: role.topLineupCe, ce: role.ce - hero.ce });
}
return ctx.service.utils.resResult(STATUS.SUCCESS);