武将:职业天赋接口
This commit is contained in:
@@ -5,7 +5,7 @@ import { dicEvent, dicEventList, loadEvent } from "./dictionary/DicEvent";
|
||||
import { dicExpedition, DicExpedition, loadExpedition } from "./dictionary/DicExpedition";
|
||||
import { dicExpeditionPoint, loadExpeditionPoint } from "./dictionary/DicExpeditionPoint";
|
||||
import { dicHeroSkill, loadHeroSkill } from "./dictionary/DicHeroSkill";
|
||||
import { dicJob, jobClassAndgrades, jobClassMaxGrades, loadJob } from "./dictionary/DicJob";
|
||||
import { dicJob, jobClassAndgrades, jobClassMaxGrades, loadJob, talentPointOfJob } from "./dictionary/DicJob";
|
||||
import { dicKingExp, maxPlayerLv, loadKingExp } from "./dictionary/DicKingExp";
|
||||
import { dicCharExp, loadCharExp } from "./dictionary/DicCharExp";
|
||||
import { dicQuestion, loadQuestion } from "./dictionary/DicQuestion";
|
||||
@@ -101,6 +101,8 @@ import { dicEquipQualityExtra, loadEquipQualityExtra } from './dictionary/DicEqu
|
||||
import { dicEquipSuit, dicEquipSuitByJobClass, loadEquipSuit } from "./dictionary/DicEquipSuit";
|
||||
import { dicJewelCondition, loadJewelCondition } from './dictionary/DicJewelCondition';
|
||||
import { dicMainStarBox, dicMainStarBoxByChapter, loadMainStarBox } from './dictionary/DicMainStarBox';
|
||||
import { dicHeroTalent, initTalents, loadHeroTalent } from './dictionary/DicHeroTalent';
|
||||
import { Talent } from "../db/Hero";
|
||||
|
||||
export const gameData = {
|
||||
daily: dicDaily,
|
||||
@@ -252,6 +254,9 @@ export const gameData = {
|
||||
heroIdByWar: dicHeroIdByWar,
|
||||
mainBox: dicMainStarBox,
|
||||
mainBoxByChapter: dicMainStarBoxByChapter,
|
||||
heroTalent: dicHeroTalent,
|
||||
initTalents: initTalents,
|
||||
talentPointOfJob: talentPointOfJob,
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -869,6 +874,14 @@ export function getRandEffectByGroupAndLevel(group: number, level: number) {
|
||||
return gameData.randomEffectPool.get(id);
|
||||
}
|
||||
|
||||
// 根据皮肤获得他的初始天赋id
|
||||
export function getHeroInitTalent(skinId: number) {
|
||||
let dicHero = gameData.hero.get(skinId);
|
||||
if(!dicHero) return [];
|
||||
let ids = gameData.initTalents.get(dicHero.talentId)||[];
|
||||
return ids.map(id => (new Talent(id)));
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
function initDatas() {
|
||||
parseDicParam();
|
||||
@@ -1035,6 +1048,7 @@ function loadDatas() {
|
||||
loadStone();
|
||||
loadJewelCondition();
|
||||
loadMainStarBox();
|
||||
loadHeroTalent();
|
||||
}
|
||||
|
||||
// 重载dicParam
|
||||
|
||||
Reference in New Issue
Block a user