排行榜: 获取排行榜

This commit is contained in:
luying
2021-04-07 21:00:07 +08:00
parent 34e02dea89
commit 5dca7b304d
32 changed files with 1077 additions and 290 deletions

View File

@@ -33,6 +33,7 @@ import { FriendShipModel } from '@db/FriendShip';
import { FriendApplyModel } from '@db/FriendApply';
import { FriendRelationModel } from '@db/FriendRelation';
import { unlockFigure } from '@pubUtils/itemUtils';
import { nowSeconds } from '@pubUtils/timeUtil';
/**
* Test Service
@@ -268,6 +269,7 @@ export default class GMUsers extends Service {
try {
for(let heroInfo of heroInfos) {
let hero = await HeroModel.createHero(heroInfo);
await RoleModel.incRoleInfo(heroInfo.roleId, { heroNum: 1 }, { heroNumUpdatedAt: nowSeconds() });
await unlockFigure(heroInfo.roleId, [{ type: FIGURE_UNLOCK_CONDITION.GET_HERO, paramHid: heroInfo.hid }]); // 解锁头像
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.INIT, heroInfo.roleId, hero, {});
}