2020-01-31 23:18:11 -05:00
|
|
|
package d2datadict
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
|
|
|
)
|
|
|
|
|
2020-06-30 09:17:07 -04:00
|
|
|
// MiscItems stores all of the ItemCommonRecords for misc.txt
|
|
|
|
var MiscItems map[string]*ItemCommonRecord //nolint:gochecknoglobals // Currently global by design
|
2020-01-31 23:18:11 -05:00
|
|
|
|
2020-06-30 09:17:07 -04:00
|
|
|
// LoadMiscItems loads ItemCommonRecords from misc.txt
|
2020-01-31 23:18:11 -05:00
|
|
|
func LoadMiscItems(file []byte) {
|
2020-06-30 09:17:07 -04:00
|
|
|
MiscItems = LoadCommonItems(file, d2enum.InventoryItemTypeItem)
|
2020-01-31 23:18:11 -05:00
|
|
|
log.Printf("Loaded %d misc items", len(MiscItems))
|
|
|
|
}
|