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