养成:升星bug
This commit is contained in:
@@ -14,7 +14,7 @@ import { DicSe } from './dictionary/DicSe';
|
|||||||
import { EquipType } from '../db/Equip';
|
import { EquipType } from '../db/Equip';
|
||||||
import { DicRandomEffectPool } from './dictionary/DicRandomEffectPool';
|
import { DicRandomEffectPool } from './dictionary/DicRandomEffectPool';
|
||||||
import { SchoolModel } from '../db/School';
|
import { SchoolModel } from '../db/School';
|
||||||
import { ABI_TYPE_TO_STAGE, ABI_TYPE_MAIN, ABI_JOB_STAGE } from '../consts/constModules/abilityConst'
|
import { ABI_TYPE_MAIN, ABI_JOB_STAGE, ABI_STAGE_TO_TYPE } from '../consts/constModules/abilityConst'
|
||||||
import { PvpDefenseModel } from '../db/PvpDefense';
|
import { PvpDefenseModel } from '../db/PvpDefense';
|
||||||
import { findIndex } from 'underscore';
|
import { findIndex } from 'underscore';
|
||||||
import { GuildModel } from '../db/Guild';
|
import { GuildModel } from '../db/Guild';
|
||||||
@@ -353,7 +353,7 @@ export function calHeroStarIncAttr(originHero: HeroType, update: HeroUpdate, typ
|
|||||||
}
|
}
|
||||||
for (let stage of stages) {
|
for (let stage of stages) {
|
||||||
|
|
||||||
let targetAttrId = ABI_TYPE_TO_STAGE.get(stage); // 转换为18维的属性id
|
let targetAttrId = ABI_STAGE_TO_TYPE.get(stage); // 转换为18维的属性id
|
||||||
let heroAttr = dicHero.baseAbilityArr.get(targetAttrId); // 武将表hp等
|
let heroAttr = dicHero.baseAbilityArr.get(targetAttrId); // 武将表hp等
|
||||||
let heroUpAttr = dicHero.baseAbilityUpArr.get(targetAttrId); // 武将表hp_up等
|
let heroUpAttr = dicHero.baseAbilityUpArr.get(targetAttrId); // 武将表hp_up等
|
||||||
let starUp = 0; // 星级成长
|
let starUp = 0; // 星级成长
|
||||||
@@ -1024,10 +1024,9 @@ function calScrollAddAttr(role: RoleType,heros: HeroType[], hid: number) {
|
|||||||
if (!heroScroll) return roleAttrs;
|
if (!heroScroll) return roleAttrs;
|
||||||
|
|
||||||
let preScroll = gameData.preHeroScroll.get(heroScroll.id);
|
let preScroll = gameData.preHeroScroll.get(heroScroll.id);
|
||||||
heroScroll.ceAttr.forEach((add, id) => {
|
heroScroll.ceAttr.forEach((add, attrId) => {
|
||||||
let attrId = ABI_TYPE_TO_STAGE.get(id);
|
|
||||||
|
|
||||||
let preAdd = preScroll ? preScroll.ceAttr.get(id) : 0;
|
let preAdd = preScroll ? preScroll.ceAttr.get(attrId) : 0;
|
||||||
let fixUp = (add - preAdd) * HERO_CE_RATIO;
|
let fixUp = (add - preAdd) * HERO_CE_RATIO;
|
||||||
updateRoleAttr(roleAttrs, attrId, { inc: { fixUp } });
|
updateRoleAttr(roleAttrs, attrId, { inc: { fixUp } });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export function getInitRoleInfo() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let initRole: RoleUpdate = { topLineupCe, topLineup, attr: roleAttr, ce: allCe, lv: DEFAULT_LV, exp: getHeroExpByLv(DEFAULT_HERO_LV - 1) || 0, heroNum, heroNumUpdatedAt: Date.now(), heads, frames, spines };
|
let initRole: RoleUpdate = { topLineupCe, topLineup, attr: roleAttr, ce: allCe, heroNum, heroNumUpdatedAt: Date.now(), heads, frames, spines };
|
||||||
return {
|
return {
|
||||||
role: initRole, heroes, skins: initSkins, figureInfo
|
role: initRole, heroes, skins: initSkins, figureInfo
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user