C# Класс Aura.Channel.World.Inventory.InventoryPocket

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Add ( Item item ) : bool

Adds item to pocket, at the first possible position.

AddUnsafe ( Item item ) : void

Adds item to pocket, at its position.

CountItem ( bool>.Func predicate ) : int

Returns amount of items by specified conditions.

CountItem ( int itemId ) : int

Returns amount of items by item id.

CountItem ( string tag ) : int

Returns amount of items by matching tag.

FillStacks ( Item item, List &changed ) : bool

Fills stacks that take this item. Returns true if item has been completely added to stacks/sacs.

GetItem ( bool>.Func predicate, StartAt startAt ) : Item

Returns first item to match predicate, or null.

GetItem ( long entityId ) : Item

Returns item by entity id, or null.

GetItemAt ( int x, int y ) : Item

Returns the item at the location, or null.

GetItems ( bool>.Func predicate, StartAt startAt ) : List

Returns items that match predicate.

Has ( Item item ) : bool

Returns whether the item exists in this pocket.

HasSpace ( Item item ) : bool

Returns true if there's enough space for the item in this pocket.

Remove ( Item item ) : bool

Removes item from pocket.

Remove ( int itemId, int amount, List &changed ) : int

Removes items by item id and amount. Modified items are returned as a list.

TryAdd ( Item item, byte targetX, byte targetY, Item &colliding ) : bool

Attempts to put item at the coordinates. If another item is in the new item's space it's returned in colliding. Returns whether the attempt was successful.

Защищенные методы

Метод Описание
InventoryPocket ( Pocket pocket ) : System

Описание методов

Add() публичный абстрактный Метод

Adds item to pocket, at the first possible position.
public abstract Add ( Item item ) : bool
item Item
Результат bool

AddUnsafe() публичный абстрактный Метод

Adds item to pocket, at its position.
public abstract AddUnsafe ( Item item ) : void
item Item
Результат void

CountItem() публичный абстрактный Метод

Returns amount of items by specified conditions.
public abstract CountItem ( bool>.Func predicate ) : int
predicate bool>.Func
Результат int

CountItem() публичный абстрактный Метод

Returns amount of items by item id.
public abstract CountItem ( int itemId ) : int
itemId int
Результат int

CountItem() публичный абстрактный Метод

Returns amount of items by matching tag.
public abstract CountItem ( string tag ) : int
tag string
Результат int

FillStacks() публичный абстрактный Метод

Fills stacks that take this item. Returns true if item has been completely added to stacks/sacs.
public abstract FillStacks ( Item item, List &changed ) : bool
item Item
changed List
Результат bool

GetItem() публичный абстрактный Метод

Returns first item to match predicate, or null.
public abstract GetItem ( bool>.Func predicate, StartAt startAt ) : Item
predicate bool>.Func
startAt StartAt
Результат Item

GetItem() публичный абстрактный Метод

Returns item by entity id, or null.
public abstract GetItem ( long entityId ) : Item
entityId long
Результат Item

GetItemAt() публичный абстрактный Метод

Returns the item at the location, or null.
public abstract GetItemAt ( int x, int y ) : Item
x int
y int
Результат Item

GetItems() публичный абстрактный Метод

Returns items that match predicate.
public abstract GetItems ( bool>.Func predicate, StartAt startAt ) : List
predicate bool>.Func
startAt StartAt
Результат List

Has() публичный абстрактный Метод

Returns whether the item exists in this pocket.
public abstract Has ( Item item ) : bool
item Item
Результат bool

HasSpace() публичный абстрактный Метод

Returns true if there's enough space for the item in this pocket.
public abstract HasSpace ( Item item ) : bool
item Item
Результат bool

InventoryPocket() защищенный Метод

protected InventoryPocket ( Pocket pocket ) : System
pocket Pocket
Результат System

Remove() публичный абстрактный Метод

Removes item from pocket.
public abstract Remove ( Item item ) : bool
item Item
Результат bool

Remove() публичный абстрактный Метод

Removes items by item id and amount. Modified items are returned as a list.
public abstract Remove ( int itemId, int amount, List &changed ) : int
itemId int
amount int
changed List
Результат int

TryAdd() публичный абстрактный Метод

Attempts to put item at the coordinates. If another item is in the new item's space it's returned in colliding. Returns whether the attempt was successful.
public abstract TryAdd ( Item item, byte targetX, byte targetY, Item &colliding ) : bool
item Item
targetX byte
targetY byte
colliding Item
Результат bool