diff options
| author | historia <[not public]> | 2026-09-18 20:03:13 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-18 20:03:13 -0400 |
| commit | 79764732406d6484f67d3dec045483dcb5d08c28 (patch) | |
| tree | 7a64e8581a540b97ed554f5723e2d587424ab1c6 /internal/game/cmd_shop.go | |
| parent | f1e461ab6aec6b9bf056bbe2daa88a251e0f21da (diff) | |
| download | thehouseoficarus-79764732406d6484f67d3dec045483dcb5d08c28.tar.gz | |
feat: better card ascii art
Diffstat (limited to 'internal/game/cmd_shop.go')
| -rw-r--r-- | internal/game/cmd_shop.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/game/cmd_shop.go b/internal/game/cmd_shop.go index e2209fc..282d3ca 100644 --- a/internal/game/cmd_shop.go +++ b/internal/game/cmd_shop.go @@ -382,7 +382,7 @@ func (g *Game) doShopSell(sess *net.Session, mob *world.MobInstance, input strin func (g *Game) shopInvCapacity(p *player.Player, itemID string, def *item.ItemDef) int { if def != nil && def.Stackable { quality, maxQuality := stackProps(def) - for i := 0; i < 28; i++ { + for i := 0; i < player.MaxInventorySlots; i++ { // Capacity must agree with giveShopItems: only a stack with the // properties a fresh stack gets can absorb a purchase (see // stackProps). Counting a differently qualified stack here would @@ -408,7 +408,7 @@ func (g *Game) giveShopItems(p *player.Player, itemID string, qty int, def *item // harvest, ammo return and pickup: a differently qualified stack is // not a merge target. quality, maxQuality := stackProps(def) - for i := 0; i < 28; i++ { + for i := 0; i < player.MaxInventorySlots; i++ { if slot := p.InvSlot(i); slot != nil && slot.ItemID == itemID && slot.Quality == quality && slot.MaxQuality == maxQuality { slot.Quantity += qty return |
