fix(item): process all 6 shared stash pages instead of 5

The loop was breaking at i > 4 (processing 5 pages) while the
stashedGold array is [6]int. Changed to i > 5 to process all
6 shared stash pages correctly.
This commit is contained in:
crazywh1t3
2026-02-16 12:10:17 +02:00
committed by guiyomu-dev
parent 54526b88cb
commit e743f207c8

View File

@@ -42,8 +42,8 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD
stashedGold := [6]int{mainPlayerStashedGold.Value, 0, 0, 0, 0, 0}
for i, puKey := range stashPlayerUnitOrder {
if i > 4 {
break // max 5 shared stash pages
if i > 5 {
break // max 6 shared stash pages
}
if stashGold, found := stashPlayerUnits[puKey].BaseStats.FindStat(stat.StashGold, 0); found {
stashedGold[i+1] = stashGold.Value