temp fix on qty

This commit is contained in:
guiyomu-dev
2026-02-17 02:45:03 +01:00
parent efddf658de
commit 0ad15efcf8

View File

@@ -369,19 +369,19 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD
statsListExPtr := uintptr(ReadUIntFromBuffer(itemDataBuffer, 0x88, Uint64))
itm.BaseStats, itm.Stats = gd.getItemStats(statsListExPtr)
// Read stack quantity from UnitData+0x9C (DLC tabs store quantity here instead of in stats)
stackQty := gd.Process.ReadUInt(unitDataPtr+0x9C, Uint32)
found := false
for i := range itm.Stats {
if itm.Stats[i].ID == stat.Quantity && itm.Stats[i].Layer == 0 {
itm.Stats[i].Value = int(stackQty)
found = true
break
}
}
if !found && stackQty > 0 {
itm.Stats = append(itm.Stats, stat.Data{ID: stat.Quantity, Value: int(stackQty), Layer: 0})
}
// // Read stack quantity from UnitData+0x9C (DLC tabs store quantity here instead of in stats)
// stackQty := gd.Process.ReadUInt(unitDataPtr+0x9C, Uint32)
// found := false
// for i := range itm.Stats {
// if itm.Stats[i].ID == stat.Quantity && itm.Stats[i].Layer == 0 {
// itm.Stats[i].Value = int(stackQty)
// found = true
// break
// }
// }
// if !found && stackQty > 0 {
// itm.Stats = append(itm.Stats, stat.Data{ID: stat.Quantity, Value: int(stackQty), Layer: 0})
// }
// Process socket information
if location == item.LocationSocket {