GameItemObjectList Remove() Methods

v4.0

Remove all based on number of ItemAttributes

// If GameItemObject, ItemObject, or itemObjectUid is provided, only those of
// that ItemObject will be removed

// Remove all with exact number of attributes
public void RemoveAllWithExactlyXAttributes(int amount, ItemObject itemObject)
public void RemoveAllWithExactlyXAttributes(int amount, GameItemObject gameItemObject)
public void RemoveAllWithExactlyXAttributes(int amount, string itemObjectUid = null)

// Remove all with less than X attributes
public void RemoveAllWithLessThanXAttributes(int amount, ItemObject itemObject)
public void RemoveAllWithLessThanXAttributes(int amount, GameItemObject gameItemObject)
public void RemoveAllWithLessThanXAttributes(int amount, string itemObjectUid = null) 

// Remove all with more than X attributes
public void RemoveAllWithMoreThanXAttributes(int amount, ItemObject itemObject)
public void RemoveAllWithMoreThanXAttributes(int amount, GameItemObject gameItemObject)
public void RemoveAllWithMoreThanXAttributes(int amount, string itemObjectUid = null)

// Remove all with no attributes
public void RemoveAllWithNoAttributes(ItemObject itemObject)
public void RemoveAllWithNoAttributes(GameItemObject gameItemObject)
public void RemoveAllWithNoAttributes(string itemObjectUid = null)

Remove all based on specific ItemAttributes

Remove duplicates

These methods will remove any duplicates. The single-object methods have an optional itemObjectUid, when null, will remove any duplicate in the entire list.

There is also an optional bool includeItemAttributes, which is false by default. When true, a GameItemObject must match both its Uid() and its list of ItemAttributes to qualify as a duplicate.

Last updated

Was this helpful?