Fix moving an item in the fastpanel corrupting profiles (!420)

Can be tested by moving a bandage into your hotbar, then moving that same bandage into a different hotbar slot. Restart the client and it'll complain about "Item#" where # is the first slot you moved it into

![image](/attachments/95723854-6b99-4da5-8d08-fd1cd4f592d8)

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/420
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
This commit is contained in:
DrakiaXYZ 2024-11-02 09:37:23 +00:00 committed by chomp
parent f38e3e5dfa
commit f3e3594e1b

View File

@ -529,7 +529,7 @@ export class InventoryController {
for (const index in pmcData.Inventory.fastPanel) {
// Find item with existing item in it and remove existing binding, you cant have same item bound to more than 1 slot
if (pmcData.Inventory.fastPanel[index] === bindRequest.item) {
pmcData.Inventory.fastPanel[index] = "";
delete pmcData.Inventory.fastPanel[index];
break;
}