public GetItem ( bool>.Func |
||
predicate | bool>.Func | |
startAt | StartAt | /// Affects the order of the returned items, based on their position in /// the inventory. /// |
return | Item |
public Item GetItem(Func<Item, bool> predicate, StartAt startAt = StartAt.Random)
{
lock (_pockets)
{
foreach (var pocket in _pockets.Values)
{
var item = pocket.GetItem(predicate, startAt);
if (item != null)
return item;
}
return null;
}
}
CreatureInventory::GetItem ( long entityId ) : Item |