皮肤:修改存储逻辑
This commit is contained in:
@@ -325,21 +325,23 @@ export function calHeroStarIncAttr(originHero: HeroType, update: HeroUpdate, typ
|
||||
updateHeroAttr(heroAttrs, targetAttrId, { set: { base: newBase } });
|
||||
}
|
||||
|
||||
// 解锁技能
|
||||
let curSkin = skins.find(cur => cur.enable);
|
||||
let curSeidList = getSeidListOfFashion(curSkin.id, star, colorStar);
|
||||
let preSeidList = getSeidListOfFashion(curSkin.id, isInit ? 0 : originStar, isInit ? 0 : originColorStar);
|
||||
|
||||
curSeidList.forEach((seid, type) => {
|
||||
if (!preSeidList.has(type)) {
|
||||
addSeidList.push(seid, 0);
|
||||
}
|
||||
});
|
||||
preSeidList.forEach((seid, type) => {
|
||||
if (!curSeidList.has(type)) {
|
||||
removeSeidList.push(seid, 0);
|
||||
}
|
||||
});
|
||||
// 武将被动技能,初始时候还没有皮肤,就先不算被动
|
||||
if(skins.length > 0) {
|
||||
let curSkin = skins.find(cur => cur.enable);
|
||||
let curSeidList = getSeidListOfFashion(curSkin.id, star, colorStar);
|
||||
let preSeidList = getSeidListOfFashion(curSkin.id, isInit ? 0 : originStar, isInit ? 0 : originColorStar);
|
||||
|
||||
curSeidList.forEach((seid, type) => {
|
||||
if (!preSeidList.has(type)) {
|
||||
addSeidList.push(seid, 0);
|
||||
}
|
||||
});
|
||||
preSeidList.forEach((seid, type) => {
|
||||
if (!curSeidList.has(type)) {
|
||||
removeSeidList.push(seid, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
originHero.attr = heroAttrs;
|
||||
return heroAttrs;//属性增量可以是多个
|
||||
|
||||
Reference in New Issue
Block a user