排行榜: 获取排行榜
This commit is contained in:
@@ -12,7 +12,7 @@ import { getHeroInfoById } from 'app/pubUtils/gamedata';
|
||||
import { calPlayerCeAndSave, reCalAllHeroCe } from 'app/pubUtils/playerCe';
|
||||
import { getExpByLv, getHeroExpByLv, gameData } from 'app/pubUtils/data';
|
||||
import { isString } from 'underscore';
|
||||
import { getAge } from 'app/pubUtils/timeUtil';
|
||||
import { getAge, nowSeconds } from 'app/pubUtils/timeUtil';
|
||||
import { shouldRefresh, resResult } from 'app/pubUtils/util';
|
||||
import { authenticate } from 'app/pubUtils/httpUtil';
|
||||
|
||||
@@ -304,6 +304,7 @@ export default class Auth extends Service {
|
||||
let skinIds = new Array<number>();
|
||||
let conditions = new Array<{type: number, paramHid?: number, paramFavourLv?: number, paramSkinId?: number }>()
|
||||
|
||||
let heroNum = 0;
|
||||
for (let hid of DEFAULT_HEROES) {
|
||||
let hero = await HeroModel.findByHidAndRole(hid, roleId);
|
||||
if (hero) {
|
||||
@@ -325,8 +326,10 @@ export default class Auth extends Service {
|
||||
conditions.push({type: FIGURE_UNLOCK_CONDITION.GET_SKIN, paramSkinId: initialSkin});
|
||||
|
||||
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.INIT, roleId, hero, {});
|
||||
heroNum ++;
|
||||
|
||||
}
|
||||
await RoleModel.incRoleInfo(role.roleId, { heroNum }, { heroNumUpdatedAt: nowSeconds() });
|
||||
// 解锁形象
|
||||
await ctx.service.utils.unlockFigure(roleId, conditions, role);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user