mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-16 17:35:57 -05:00
bfd3f1046d
* wip d2items system and item properties * added loader for TreasureClassEx.txt * wip item spawn from treasure class records * wip items * add call to init item equivalencies, remove treasure class test from d2app * made item affix records global var a map of affix codes to the records * changed how item to item common record equivalency is determined * changed set items records export to a map of their codes to the records, grouped property params into a struct * changed property parameter field from calcstring to string * fixed bug in stat value clone * adding equipper interface as part of stat context, eventually to be used to resolve set bonus (among other things) * made the item interface simpler, only needs name and description methods * adding equipper interface, for anything that will equip or have active items * handle case where min and max are swapped, removed commented code * added property/stat resolution for magic, rare, set, and unique items * adding item generator which can roll for items using treasure class records * fixed item equivalency func being called in the wrong spot
13 lines
400 B
Go
13 lines
400 B
Go
package d2item
|
|
|
|
import "github.com/OpenDiablo2/OpenDiablo2/d2core/d2stats"
|
|
|
|
// StatContext is anything which has a `StatList` method which yields a StatList.
|
|
// This is used for resolving stat dependencies for showing actual values, like
|
|
// stats that are based off of the current character level
|
|
type StatContext interface {
|
|
Equipper
|
|
BaseStatList() d2stats.StatList
|
|
StatList() d2stats.StatList
|
|
}
|