mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-18 02:16:23 -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
28 lines
1.2 KiB
Go
28 lines
1.2 KiB
Go
package d2records
|
|
|
|
// PropertyDescriptor is a generic description of a property, used to create properties.
|
|
// Sets, SetItems, UniqueItems will all use this generic form of a property
|
|
type PropertyDescriptor struct {
|
|
// Code is an ID pointer of a property from Properties.txt,
|
|
// these columns control each of the eight different full set modifiers a set item can grant you
|
|
// at most.
|
|
Code string
|
|
|
|
// Param is the passed on to the associated property, this is used to pass skill IDs, state IDs,
|
|
// monster IDs, montype IDs and the like on to the properties that require them,
|
|
// these fields support calculations.
|
|
Parameter string
|
|
|
|
// Min value to assign to the associated property.
|
|
// Certain properties have special interpretations based on stat encoding (e.g.
|
|
// chance-to-cast and charged skills). See the File Guides for Properties.txt and ItemStatCost.
|
|
// txt for further details.
|
|
Min int
|
|
|
|
// Max value to assign to the associated property.
|
|
// Certain properties have special interpretations based on stat encoding (e.g.
|
|
// chance-to-cast and charged skills). See the File Guides for Properties.txt and ItemStatCost.
|
|
// txt for further details.
|
|
Max int
|
|
}
|