✨ feat(武将): 重生体验优化 ca13e8be3 至 4ee246e78
This commit is contained in:
@@ -4,10 +4,10 @@ import { DEFAULT_HEROES, LINEUP_NUM, ROLE_SELECT, TALENT_RELATION_TYPE, TERAPH_R
|
||||
import { DicTeraph } from '../pubUtils/dictionary/DicTeraph';
|
||||
import { Teraph, RoleModel, RoleType, RoleUpdate } from '../db/Role';
|
||||
import { SCHOOL } from '../pubUtils/dicParam';
|
||||
import { gameData, getHeroInitTalent, getHeroStarByQuality } from '../pubUtils/data';
|
||||
import { gameData, getEquipByJobClassAndEPlace, getHeroInitTalent, getHeroStarByQuality } from '../pubUtils/data';
|
||||
import { SchoolModel } from '../db/School';
|
||||
import { SclResultInter, SclPosInter, RewardInter, ItemInter } from '../pubUtils/interface';
|
||||
import { Connect, HeroModel, HeroSkin, HeroType, HeroUpdate, Talent } from '../db/Hero';
|
||||
import { Connect, EPlace, HeroModel, HeroSkin, HeroType, HeroUpdate, Talent } from '../db/Hero';
|
||||
import { SkinUpdate } from '../db/Skin';
|
||||
import { Figure } from '../domain/dbGeneral';
|
||||
import { pick } from 'underscore';
|
||||
@@ -390,4 +390,17 @@ export function replaceAuthorBooks(authorBooks: AuthorBookType[], authorBook: Au
|
||||
authorBooks[index] = authorBook;
|
||||
}
|
||||
return authorBooks;
|
||||
}
|
||||
|
||||
|
||||
export function getHeroNewEplace(hero: HeroType, ePlace: EPlace[]) {
|
||||
const dicHero = gameData.hero.get(hero.skinId);
|
||||
let newEplace = [];
|
||||
for (let eP of ePlace) {
|
||||
const dicEquip = getEquipByJobClassAndEPlace(dicHero?.jobClass, eP.id);
|
||||
if (!dicEquip) continue;
|
||||
// const newEquip = new EPlace(eP.id, dicEquip.id);
|
||||
newEplace.push({ ...eP, equipId: dicEquip.id });
|
||||
}
|
||||
return newEplace;
|
||||
}
|
||||
Reference in New Issue
Block a user