// 军团职位表
import { readFileAndParse } from '../util'
import { FILENAME } from '../../consts'

export interface DicGuildPosition {

    // 职位id
    readonly id: number;
    // 职位名
    readonly name: string;
    // 排名比例
    readonly rankProportion: number;
    // 拍卖行额外分成占比
    readonly sellRatio: number;
    // 周活跃额外分成比例
    readonly activeRatio: number;
}

export const dicGuildPosition = new Map<number, DicGuildPosition>();
export function loadGuildPosition() {
    dicGuildPosition.clear();
    let arr = readFileAndParse(FILENAME.DIC_GUILD_POSITION);

    arr.forEach(o => {
        dicGuildPosition.set(o.id, o);
    });
    arr = undefined;
}
