D2SLib icon indicating copy to clipboard operation
D2SLib copied to clipboard

incorrect value in read/write Armor

Open JuQiang opened this issue 3 years ago • 0 comments

writer.WriteUInt16((ushort)(item.Armor - itemStatCost.GetByStat("armorclass")?["Save Add"].ToUInt16() ?? 0), 11);

should be: writer.WriteUInt16((ushort)(item.Armor + itemStatCost.GetByStat("armorclass")?["Save Add"].ToUInt16() ?? 0), 11);

item.Armor = (ushort)(reader.ReadUInt16(11) + itemStatCost.GetByStat("armorclass")?["Save Add"].ToUInt16() ?? 0); should be: item.Armor = (ushort)(reader.ReadUInt16(11) - itemStatCost.GetByStat("armorclass")?["Save Add"].ToUInt16() ?? 0);

JuQiang avatar Jan 22 '22 04:01 JuQiang