🐞 fix(gvg): 联军信息变动同步

This commit is contained in:
luying
2023-02-27 21:54:54 +08:00
parent 1f04496865
commit a89692f4ef
11 changed files with 121 additions and 11 deletions
@@ -21,6 +21,7 @@ import { sendMessageToUserWithSuc } from './pushService';
import { ActionPointModel } from '../db/ActionPoint';
import { GK_MAIN, GK_MAINELITE, RECHARGE } from '../pubUtils/dicParam';
import { rebateHistoryOrder } from './orderService';
import { updateGVGBattleRoleInfo } from './gvg/gvgTeamService';
export async function roleLevelup(type: KING_EXP_RATIO_TYPE, roleId: string, kingExp: number = 0, session: BackendSession) {
const serverId = session.get('serverId');
@@ -56,6 +57,8 @@ export async function roleLevelup(type: KING_EXP_RATIO_TYPE, roleId: string, kin
if(lv < RECHARGE.RECHARGE_RMB_RETURN_LEVEL_LIMITED && newLv >= RECHARGE.RECHARGE_RMB_RETURN_LEVEL_LIMITED) {
rebateHistoryOrder(roleId, role.userInfo?.uid);
}
await updateGVGBattleRoleInfo(serverId, roleId, { lv });
}
let actordata: { lv: number, exp: number, getExp: number, mostExp: number }[] = [];
for (let i = lv; i <= newLv; i++) {