import { PropTypeKey } from "../.." ; import { layeredAssignment } from "../../Util" ; type WeaponPromoteExcelConfigData = { "WeaponPromoteId" : number ; "PromoteLevel" : number ; "CostItems" : { "Id" : number ; "Count" : number ; } [ ] ; "CoinCost" : number ; "AddProps" : { "PropType" : PropTypeKey ; "Value" : number ; } [ ] ; "UnlockMaxLevel" : number ; "RequiredPlayerLevel" : number ; } ; const weaponPromoteExcelConfigDataSrc = require ( '../../GenshinData/ExcelBinOutput/WeaponPromoteExcelConfigData.json' ) as WeaponPromoteExcelConfigData [ ] ; const weaponPromoteExcelConfigData = { } as Record < number , WeaponPromoteExcelConfigData [ ] > ; weaponPromoteExcelConfigDataSrc . forEach ( data => { const { WeaponPromoteId = 0 , PromoteLevel = 0 } = data ; if ( ! WeaponPromoteId || ! PromoteLevel ) return ; if ( ! weaponPromoteExcelConfigData [ WeaponPromoteId ] ) weaponPromoteExcelConfigData [ WeaponPromoteId ] = [ null ] ; layeredAssignment ( weaponPromoteExcelConfigData , [ WeaponPromoteId , PromoteLevel ] , data ) ; } ) ; export default weaponPromoteExcelConfigData ;