Волк: NRE при выкладке из сумки (лог читал очищенную ячейку)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AlexCube
2026-10-11 00:16:27 +03:00
co-authored by Claude Opus 5.5
parent d845fa1108
commit aa19299cf1
+2 -1
View File
@@ -266,12 +266,13 @@ namespace NecromancerTome
Audio.Manager.PlayInsidePlayerHead("ui_denied");
return false;
}
string name = src.itemValue.ItemClass?.GetItemName(); // до SetSlot: src - сама ячейка сумки, очистится
ItemStack rest = src.Clone();
rest.count = left;
b.SetSlot(_idx, left > 0 ? rest : ItemStack.Empty.Clone());
Save();
Audio.Manager.PlayInsidePlayerHead("UseActions/takeall1");
Debug.Log("[NecromancerTome] WolfBag: из сумки в контейнер " + src.itemValue.ItemClass.GetItemName() + " x" + moved + " - " + Describe());
Debug.Log("[NecromancerTome] WolfBag: из сумки в контейнер " + name + " x" + moved + " - " + Describe());
return true;
}