1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-11 10:20:41 +00:00
OpenDiablo2/d2core/d2records/item_ratio_record.go
gravestench 271673851a
Added RecordManager implementation to remove d2datadict singletons (#736)
* Added RecordManager implementation to remove d2datadict singletons

* fix object lookup test
2020-09-19 14:33:40 -04:00

33 lines
894 B
Go

package d2records
// ItemRatios holds all of the ItemRatioRecords from ItemRatio.txt
type ItemRatios map[string]*ItemRatioRecord
// A helper type for item drop calculation
type DropRatioInfo struct {
Frequency int
Divisor int
DivisorMin int
}
// ItemRatioRecord encapsulates information found in ItemRatio.txt, it specifies drop ratios
// for various types of items
// The information has been gathered from [https://d2mods.info/forum/kb/viewarticle?a=387]
type ItemRatioRecord struct {
Function string
// 0 for classic, 1 for LoD
Version bool
// 0 for normal, 1 for exceptional
Uber bool
ClassSpecific bool
// All following fields are used in item drop calculation
UniqueDropInfo DropRatioInfo
RareDropInfo DropRatioInfo
SetDropInfo DropRatioInfo
MagicDropInfo DropRatioInfo
HiQualityDropInfo DropRatioInfo
NormalDropInfo DropRatioInfo
}