From 85f88cb063a081c6d3382112319abf63fd398d54 Mon Sep 17 00:00:00 2001 From: Arto Simonyan Date: Tue, 24 Dec 2024 10:49:40 +0200 Subject: [PATCH] Ignore items in protected slots (#603) --- internal/action/stash.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/action/stash.go b/internal/action/stash.go index a6936217..6bb427eb 100644 --- a/internal/action/stash.go +++ b/internal/action/stash.go @@ -176,6 +176,11 @@ func shouldStashIt(i data.Item, firstRun bool) (bool, string, string) { ctx := context.Get() ctx.SetLastStep("shouldStashIt") + // Don't stash items in protected slots + if ctx.CharacterCfg.Inventory.InventoryLock[i.Position.Y][i.Position.X] == 0 { + return false, "", "" + } + // Don't stash items from quests during leveling process, it makes things easier to track if _, isLevelingChar := ctx.Char.(context.LevelingCharacter); isLevelingChar && i.IsFromQuest() { return false, "", ""