ex:
Game.GetPlayer().RemoveItem(SomeFormList, 100, true, SomeContainer)
My question is how do i make it remove ALL of each item in the list without having to give a specific number of them to remove?
I can get the intended effect by looping through the form list and use GetItemCount() to figure out how many to remove but that is slow as hell.
something like this:
int index = 0
While (index < list.GetSize())
Form f = list.GetAt(index)
int count = Game.GetPlayer().GetItemCount(f)
if(count)
Game.GetPlayer().RemoveItem(f, count, false, somecontainer)
endif
index = index + 1
EndWhile
While (index < list.GetSize())
Form f = list.GetAt(index)
int count = Game.GetPlayer().GetItemCount(f)
if(count)
Game.GetPlayer().RemoveItem(f, count, false, somecontainer)
endif
index = index + 1
EndWhile
the wiki has this note:
If you pass in a form list, it will remove aiCount of each item in the form list from the container. If there isn't aiCount of a particular item in the container, it will remove all of them.
If i pass in 10, and there's only 9 it will remove all of them. Cool. But if there's 20 and i pass in 10 it only remove 10. How to make it remove ALL everytime?
