奇遇:修复多次创建奇遇bug

This commit is contained in:
luying
2021-08-27 14:09:31 +08:00
parent 2b3993f4f2
commit cbc4087a5b
4 changed files with 16 additions and 19 deletions

View File

@@ -1054,11 +1054,9 @@ function calTitle(role: RoleType, update: RoleUpdate) {
let dicOldTitle = gameData.title.get(oldTitle)||{ mainAttrValue: new Map(), assiAttrValue: new Map() };
let dicNewTitle = gameData.title.get(newTitle);
console.log('***** oldTitle, newTitle', oldTitle, newTitle);
for (let i = ABI_TYPE.ABI_HP; i < ABI_TYPE.ABI_MAX; i++) {
if (dicNewTitle.mainAttrValue.has(i) || dicOldTitle.mainAttrValue.has(i)) {
console.log()
let fixUp = ((dicNewTitle.mainAttrValue.get(i) || 0) - (dicOldTitle.mainAttrValue.get(i) || 0)) * HERO_CE_RATIO;
updateRoleAttr(roleAttrs, i, { inc: { fixUp } });
}