Merge pull request #67 from Neo-Silver/StackQty
Add StackQty As Property
This commit is contained in:
@@ -111,6 +111,7 @@ type Item struct {
|
|||||||
InTradeOrStoreScreen bool
|
InTradeOrStoreScreen bool
|
||||||
IsInSocket bool
|
IsInSocket bool
|
||||||
UniqueSetID int32
|
UniqueSetID int32
|
||||||
|
StackedQuantity int
|
||||||
}
|
}
|
||||||
|
|
||||||
type Drop struct {
|
type Drop struct {
|
||||||
|
|||||||
@@ -369,19 +369,9 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD
|
|||||||
statsListExPtr := uintptr(ReadUIntFromBuffer(itemDataBuffer, 0x88, Uint64))
|
statsListExPtr := uintptr(ReadUIntFromBuffer(itemDataBuffer, 0x88, Uint64))
|
||||||
itm.BaseStats, itm.Stats = gd.getItemStats(statsListExPtr)
|
itm.BaseStats, itm.Stats = gd.getItemStats(statsListExPtr)
|
||||||
|
|
||||||
// // Read stack quantity from UnitData+0x9C (DLC tabs store quantity here instead of in stats)
|
// stack quantity as item property
|
||||||
// stackQty := gd.Process.ReadUInt(unitDataPtr+0x9C, Uint32)
|
stackQty := gd.Process.ReadUInt(unitDataPtr+0x9C, Uint32)
|
||||||
// found := false
|
itm.StackedQuantity = int(stackQty)
|
||||||
// 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
|
// Process socket information
|
||||||
if location == item.LocationSocket {
|
if location == item.LocationSocket {
|
||||||
|
|||||||
Reference in New Issue
Block a user