1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-02 17:27:23 -04:00
OpenDiablo2/d2core/d2records/set_record.go
gravestench 622186e350
fixed 'dupl' lint errors (#845)
* 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
2020-10-26 00:38:18 -07:00

35 lines
892 B
Go

package d2records
// Sets contain the set records from sets.txt
type Sets map[string]*SetRecord
// SetRecord describes the set bonus for a group of set items
type SetRecord struct {
// index
// String key linked to by the set field in SetItems.
// txt - used to tie all of the set's items to the same set.
Key string
// name
// String key to item's name in a .tbl file.
StringTableKey string
// Version 0 for vanilla, 100 for LoD expansion
Version int
// Level
// set level, perhaps intended as a minimum level for partial or full attributes to appear
// (reference only, not loaded into game).
Level int
// Properties contains the partial and full set bonus properties.
Properties struct {
PartialA []*SetProperty
PartialB []*SetProperty
Full []*SetProperty
}
}
// SetProperty represents a property possessed by the set
type SetProperty = PropertyDescriptor