军团:添加活跃排行榜
This commit is contained in:
@@ -6,6 +6,7 @@ import { redisUserInfoUpdate } from './redisService';
|
||||
import { switchOnFunc } from './funcSwitchService';
|
||||
import { FUNC_OPT_TYPE } from '../consts';
|
||||
import { BackendSession } from 'pinus';
|
||||
import { REDIS_KEY } from '../consts/consts';
|
||||
|
||||
export async function roleLevelup(roleId: string, kingExp: number, session: BackendSession) {
|
||||
let role = await RoleModel.findByRoleId(roleId);
|
||||
@@ -23,7 +24,7 @@ export async function roleLevelup(roleId: string, kingExp: number, session: Back
|
||||
role = await RoleModel.levelup(roleId, newLv, newExp);
|
||||
if(newLv > lv) { // 升级
|
||||
await switchOnFunc(roleId, FUNC_OPT_TYPE.LEVEL_UP, newLv, session);
|
||||
await redisUserInfoUpdate(roleId, [{field: 'lv', value: newLv}])
|
||||
await redisUserInfoUpdate(REDIS_KEY.USER_INFO, roleId, [{field: 'lv', value: newLv}])
|
||||
}
|
||||
let actordata = [];
|
||||
for(let i = lv; i <= newLv; i++) {
|
||||
|
||||
Reference in New Issue
Block a user