// 装备升品表
import { readFileAndParse } from '../util'
import { FILENAME } from '../../consts';

export interface DicEquipQualityExtra {
    // id
    readonly id: number;
    // 品质
    readonly quality: number;
    // 限制星级
    readonly star: number;
    // 天晶石
    readonly jewelCnt: number;
    // 地玉石
    readonly stoneCnt: number;

}

export const dicEquipQualityExtra = new Map<number, DicEquipQualityExtra>();

export function loadEquipQualityExtra() {
    dicEquipQualityExtra.clear();
    let arr = readFileAndParse(FILENAME.DIC_EQUIP_QUALITY_EXTRA);
    
    arr.forEach(o => {
        dicEquipQualityExtra.set(o.quality, o);
    });
    arr = undefined;
}