✨ feat(通用丹): 增加通用丹功能
https://bantugame.feishu.cn/wiki/wikcnlWkklK1jkQZRHgbQ0nrVNc
This commit is contained in:
@@ -110,6 +110,7 @@ import { dicMainWarRewardByChapter, loadMainWarReward } from './dictionary/DicMa
|
||||
import { dicLadderMatch, loadLadderMatch } from "./dictionary/DicLadderMatch";
|
||||
import { dicLadderDifficultRatio, loadLadderDifficultRatio } from "./dictionary/DicLadderDifficultRatio";
|
||||
import { dicLadderRankReward, loadLadderRankReward } from "./dictionary/DicLadderRankReward";
|
||||
import { dicGeneralGoods, loadGeneralGoods } from "./dictionary/DicGeneralGoods";
|
||||
|
||||
export const gameData = {
|
||||
daily: dicDaily,
|
||||
@@ -276,6 +277,7 @@ export const gameData = {
|
||||
ladderRankReward: dicLadderRankReward,
|
||||
comBattleRewardTime: new Array<{from: string, to: string}>(),
|
||||
comBattleReward: dicComBattleReward,
|
||||
relationGoods: dicGeneralGoods,
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -1219,6 +1221,7 @@ function loadDatas() {
|
||||
loadLadderMatch();
|
||||
loadLadderDifficultRatio();
|
||||
loadLadderRankReward();
|
||||
loadGeneralGoods();
|
||||
}
|
||||
|
||||
// 重载dicParam
|
||||
|
||||
14
shared/pubUtils/dictionary/DicGeneralGoods.ts
Normal file
14
shared/pubUtils/dictionary/DicGeneralGoods.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
// 礼包奖励表
|
||||
import { readFileAndParse } from '../util';
|
||||
import { FILENAME } from '../../consts';
|
||||
|
||||
export const dicGeneralGoods = new Map<number, number>();
|
||||
export function loadGeneralGoods() {
|
||||
dicGeneralGoods.clear();
|
||||
let arr = readFileAndParse(FILENAME.DIC_GENERAL_GOODS);
|
||||
|
||||
arr.forEach(o => {
|
||||
dicGeneralGoods.set(o.goodId, o.relationGoodId);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user