D2SLib
D2SLib copied to clipboard
incorrect value in read/write Armor
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);