mofr / Diablerie

Diablo 2 reimplementation on unity
MIT License
962 stars 217 forks source link

Fix socketed item description #105

Open mofr opened 4 years ago

mofr commented 4 years ago

That one (Item.DescribeProperty func 14) is incorrect, it’s sb.Append(prop.param); and not value

Also the block.stat == null will not trigger because block.stat = item_numsockets But the prop item_numsockets do not have a description function so it will reach line 593 but has nothing to display. Example [id] => sock [is_active] => 1 [block1_set] => [block1_val] => [block1_func] => 14 [block1_stat] => item_numsockets [notes] => none [affixId] => Jeweler's [param] => 4 [min] => [max] => [value] => 0

That one is a bit tricky, it can use the param on some affixes like Jeweler that add a fix 4 sockets, while it can use the value like on Mechanist affix with a min/max, so it require a double check, if param is set use that, otherwise use value.

cc @giviz