diff options
| author | historia <[not public]> | 2026-09-18 17:48:26 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-18 17:48:26 -0400 |
| commit | 8fe9e3c3fef0049df82281a62afe35dda516dfe2 (patch) | |
| tree | dd269f2c0710f334e19f00a191260ebc46284a90 /internal/game/act_clean.go | |
| parent | 194164a77eb4f2479b94c19e6f0e1278ab608781 (diff) | |
| download | thehouseoficarus-8fe9e3c3fef0049df82281a62afe35dda516dfe2.tar.gz | |
fix: close combat ghost, admin traversal, login throttle, journal double-pay, and quality/economy gaps
Diffstat (limited to 'internal/game/act_clean.go')
| -rw-r--r-- | internal/game/act_clean.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/game/act_clean.go b/internal/game/act_clean.go index 3525475..4efe293 100644 --- a/internal/game/act_clean.go +++ b/internal/game/act_clean.go @@ -56,7 +56,17 @@ func (g *Game) advanceClean(sess *net.Session, p *player.Player) { } craft := matchItem.FirstCraft() - consumeID := craft.Ingredients[0].Items[0] + // Resolve the exact alternative the availability check selected instead + // of assuming the first listed item: an ingredient-less or + // alternative-item cleaning recipe would otherwise panic or consume the + // wrong stack while still awarding XP. + plan := planIngredients(craft, p.CountItem) + if len(plan) == 0 { + sess.WriteLine("You've finished cleaning herbs.") + g.cancelBgAction(p) + return + } + consumeID := plan[0].id for i := 0; i < 28; i++ { slot := p.InvSlot(i) |
