mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-03 15:17:04 -05:00
622186e350
* removed dupl lint errors in d2compression/huffman.go * remove duplicate code for set/unique item properties This is a more involved edit. I've added a `PropertyDescriptor` which is a common struct that should have existed already. The `PropertyDescriptor` is used to generate property instances, and is common to item affixes, set items, sets, unique items, and runewords. This was all to remove duplicate code in d2item/ * removed duplicate code for rare item affixes
21 lines
361 B
Go
21 lines
361 B
Go
package d2records
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2fileformats/d2txt"
|
|
)
|
|
|
|
func rareItemSuffixLoader(r *RecordManager, d *d2txt.DataDictionary) error {
|
|
records, err := rareItemAffixLoader(d)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
log.Printf("Loaded %d RareSuffix records", len(records))
|
|
|
|
r.Item.Rare.Suffix = records
|
|
|
|
return nil
|
|
}
|