Optimized adding items to a hidden slot

This commit is contained in:
Eddoursul 2024-02-14 07:37:56 +01:00
parent 00459d5b16
commit 23c16a0acf
2 changed files with 4 additions and 14 deletions

View File

@ -164,21 +164,11 @@ Function AddItemsToContainer(Formlist itemsToAdd, int iFormlistIndexOffset, int
EndIf EndIf
int iIndex = itemsToAdd.GetSize() - 1 containerToFill.AddItem(itemsToAdd, 1, true)
while iIndex >= 0
Form formToAdd = itemsToAdd.GetAt(iIndex) if itemsToAdd.HasForm(Gold001)
containerToFill.AddItem(Gold001, iHiddenSlotTier * 5 - 1, true)
if formToAdd == Gold001 endif
containerToFill.AddItem(itemsToAdd.GetAt(iIndex), iHiddenSlotTier*5)
Else
containerToFill.AddItem(itemsToAdd.GetAt(iIndex), 1)
EndIf
iIndex -= 1
endwhile
EndFunction EndFunction