装备:装备精炼读取数据问题
This commit is contained in:
@@ -403,9 +403,11 @@ export async function getSumCe(roleId: string, num: number) {
|
||||
export async function getHeroesAttributes(roleId: string) {
|
||||
let roleCe = await RoleCeModel.findByRoleId(roleId);
|
||||
let attrByHid = new Map<number, AttributeCal>();
|
||||
let heroAttrs = roleCe?.heroAttrs??[];
|
||||
for(let { hid, attrs } of roleCe?.attributes??[]) {
|
||||
let cal = new AttributeCal();
|
||||
cal.setLv(roleCe.roleLv);
|
||||
let heroAttr = heroAttrs.find(cur => cur.hid == hid);
|
||||
if(heroAttr) cal.setLv(heroAttr.lv);
|
||||
cal.setByWarJson(attrs);
|
||||
attrByHid.set(hid, cal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user