Do not refresh inventory when zero blueprints were stored

This commit is contained in:
Eddoursul 2024-03-02 13:51:34 +01:00
parent eaf0ed5be4
commit 331df9961d
2 changed files with 12 additions and 8 deletions

View File

@ -52,8 +52,11 @@ function StoreSingleCopy()
endif endif
/; /;
int iCount = EnderalFunctions.MoveItemsToCountByKeyword(PlayerREF, _00E_FS_BlueprintContainerActorREF, Blueprint, 1) int iCount = EnderalFunctions.MoveItemsToCountByKeyword(PlayerREF, _00E_FS_BlueprintContainerActorREF, Blueprint, 1)
if iCount > 0
ITMBookClose.Play(PlayerREF) ITMBookClose.Play(PlayerREF)
; Moving items is fast, refreshing inventory is not
Utility.WaitMenuMode(0.5) Utility.WaitMenuMode(0.5)
Form item = Game.GetForm(0x1FE82) ; non-playable Draugr Skin Form item = Game.GetForm(0x1FE82) ; non-playable Draugr Skin
PlayerREF.RemoveItem(item, 1, true) PlayerREF.RemoveItem(item, 1, true)
@ -62,6 +65,7 @@ function StoreSingleCopy()
Utility.WaitMenuMode(0.5) Utility.WaitMenuMode(0.5)
PlayerREF.RemoveItem(item, 1, true) ; doing this twice seems to reliably refresh inventory PlayerREF.RemoveItem(item, 1, true) ; doing this twice seems to reliably refresh inventory
endif endif
endif
_00E_FS_BlueprintItemsStored.Show(iCount) _00E_FS_BlueprintItemsStored.Show(iCount)
endfunction endfunction