47 lines
827 B
C#
47 lines
827 B
C#
using Decal.Interop.Filters;
|
|
|
|
namespace Decal.Adapter.Wrappers;
|
|
|
|
/// <summary>
|
|
/// Defines the WorldObjectCollection filter for objects in a container
|
|
/// </summary>
|
|
public class ByContainerFilter : WorldObjectCollectionFilter
|
|
{
|
|
private int container;
|
|
|
|
/// <summary>
|
|
/// Id of the container filtered by
|
|
/// </summary>
|
|
public int Container
|
|
{
|
|
get
|
|
{
|
|
return container;
|
|
}
|
|
set
|
|
{
|
|
container = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Creates a new filter
|
|
/// </summary>
|
|
public ByContainerFilter()
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Creates a new filter using the specified container
|
|
/// </summary>
|
|
/// <param name="container">Id of the container</param>
|
|
public ByContainerFilter(int container)
|
|
{
|
|
this.container = container;
|
|
}
|
|
|
|
internal override void ApplyFilter(WorldIterator wi)
|
|
{
|
|
wi.ByContainer(container);
|
|
}
|
|
}
|