2020-02-01 04:18:11 +00:00
|
|
|
package d2datadict
|
|
|
|
|
|
|
|
import (
|
|
|
|
"log"
|
|
|
|
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
|
|
|
)
|
|
|
|
|
2020-07-07 12:56:31 +00:00
|
|
|
// Weapons stores all of the WeaponRecords
|
|
|
|
var Weapons map[string]*ItemCommonRecord //nolint:gochecknoglobals // Currently global by design, only written once
|
2020-02-01 04:18:11 +00:00
|
|
|
|
2020-07-07 12:56:31 +00:00
|
|
|
// LoadWeapons loads weapon records
|
2020-02-01 04:18:11 +00:00
|
|
|
func LoadWeapons(file []byte) {
|
2020-06-30 13:17:07 +00:00
|
|
|
Weapons = LoadCommonItems(file, d2enum.InventoryItemTypeWeapon)
|
2020-02-01 04:18:11 +00:00
|
|
|
log.Printf("Loaded %d weapons", len(Weapons))
|
|
|
|
}
|