远征:在功能开启前不随机对手

This commit is contained in:
luying
2022-05-05 13:00:24 +08:00
parent cd314e2d13
commit a42c64bf7e
9 changed files with 796 additions and 15 deletions

View File

@@ -71,7 +71,7 @@ function getApWithDataAp(roleId: string, ip: string, lv: number, dataAp: ActionP
export async function setAp(serverId: number, roleId: string, ip: string, lv: number, changeAp: number, sid: string, reason: ITEM_CHANGE_REASON) {
// console.log('***** setAp', roleId, ip, lv, changeAp)
const now = Date.now();
const dicAp = getDicApByLv(lv);
let ApResult = await getAp(roleId, ip, lv, true);
let { ap: apBefore, maxAp, refTime, apRemainTime, apMaxRemainTime, isOver, buyTimes } = ApResult; // 更新ap
let ap = apBefore + changeAp;