军团活动:修复rpc调用以及其他问题

This commit is contained in:
luying
2021-03-19 18:28:50 +08:00
parent 7324556852
commit f7627f85d1
23 changed files with 351 additions and 109 deletions
@@ -0,0 +1,29 @@
// 公会权限
import { readJsonFile, parseGoodStr } from '../util'
import { FILENAME } from '../../consts'
import { RewardInter } from '../../pubUtils/interface';
export interface DicGuildAuction {
// 活动类型 1-蛮夷入侵 2-诸侯混战 3-粮草先行
readonly id: number;
// 最低名次
readonly min: number;
// 最高名次
readonly max: number;
// 奖励
readonly rewards: RewardInter[];
}
const str = readJsonFile(FILENAME.DIC_GUILD_AUCTION);
let arr = JSON.parse(str);
export const dicGuildAuction = new Map<number, DicGuildAuction[]>();
arr.forEach(o => {
o.rewards = parseGoodStr(o.rewards);
let rank = dicGuildAuction.get(o.id)||[];
rank.push(o);
dicGuildAuction.set(o.id, rank);
});
arr = undefined;