活动:弹窗活动新类型

This commit is contained in:
luying
2022-04-20 21:37:51 +08:00
parent 7b3b826167
commit 1913a4a2b9
13 changed files with 128 additions and 43 deletions
+3 -1
View File
@@ -38,12 +38,14 @@ interface Param {
schoolHid?: number,
preSchoolHid?: number,
skinId?: number,
roleUpdate?: RoleUpdate,
roleIncUpdate?: RoleUpdate
}
export async function calculateCeWithHero(type: HERO_SYSTEM_TYPE, roleId: string, serverId: number, sid: string, hid: number, heroUpdate: HeroUpdate, param: Param = {}) {
let heroUpdates = new Map<number, HeroUpdate>();
heroUpdates.set(hid, heroUpdate);
let { heroes, curRole } = await calculateCes(type, roleId, serverId, sid, heroUpdates, {}, {}, param);
let { heroes, curRole } = await calculateCes(type, roleId, serverId, sid, heroUpdates, param.roleUpdate||{}, param.roleIncUpdate||{}, param);
let curHero = heroes.find(cur => cur.hid == hid);
return { heroes, curHero, curRole }
}