feat(共鸣系统): 添加最强6人推送,不可养成拦截

This commit is contained in:
zhangxk
2023-10-09 20:49:24 +08:00
parent ffcdb7c0bc
commit dac8ac07a6
10 changed files with 109 additions and 42 deletions

View File

@@ -3,6 +3,7 @@ import { ArtifactModelType } from "../../db/Artifact";
import { AuthorBookType } from "../../db/AuthorBook";
import { Connect, EPlace, HeroSkin, HeroType, HeroUpdate, Stone, Talent } from "../../db/Hero";
import { JewelType } from "../../db/Jewel";
import { ResonanceType } from "../../db/Resonance";
import { RoleUpdate, Teraph } from "../../db/Role";
import { AttrCell, Attribute, EquipAttr, HeroAttr, RoleCeType, SchoolAttr, ScrollAttr } from "../../db/RoleCe";
import { TopHero } from "../../domain/dbGeneral";
@@ -137,6 +138,23 @@ export class CalCe {
return { topLineup, topLineupCe, hasTopCeChange: topLineupCe == this.originTopHeroCe };
}
public getTopLineupNew(dbResonanceMap: Map<number, ResonanceType>) {
let topLineup: TopHero[] = [], topLineupCe = 0;
let arr = this.getResultCeArr();
for (let obj of arr) {
if (topLineup.length >= LINEUP_NUM) break;
let { hid, ce } = obj;
if (dbResonanceMap.has(hid)) continue;
topLineup.push({
hid, ce, hero: this.data.heroObjectId.get(hid)
});
topLineupCe += ce;
}
return { topLineup, topLineupCe, hasTopCeChange: topLineupCe == this.originTopHeroCe };
}
// 玩家等级
public setRoleLv(lv: number) {
this.data.roleLv = lv;