C# Class Aura.Channel.World.Inventory.InventoryPocket

Afficher le fichier Open project: aura-project/aura Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
InventoryPocket ( Pocket pocket ) : System

Method Details

Add() public abstract méthode

Adds item to pocket, at the first possible position.
public abstract Add ( Item item ) : bool
item Item
Résultat bool

AddUnsafe() public abstract méthode

Adds item to pocket, at its position.
public abstract AddUnsafe ( Item item ) : void
item Item
Résultat void

CountItem() public abstract méthode

Returns amount of items by specified conditions.
public abstract CountItem ( bool>.Func predicate ) : int
predicate bool>.Func
Résultat int

CountItem() public abstract méthode

Returns amount of items by item id.
public abstract CountItem ( int itemId ) : int
itemId int
Résultat int

CountItem() public abstract méthode

Returns amount of items by matching tag.
public abstract CountItem ( string tag ) : int
tag string
Résultat int

FillStacks() public abstract méthode

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
Résultat bool

GetItem() public abstract méthode

Returns first item to match predicate, or null.
public abstract GetItem ( bool>.Func predicate, StartAt startAt ) : Item
predicate bool>.Func
startAt StartAt
Résultat Item

GetItem() public abstract méthode

Returns item by entity id, or null.
public abstract GetItem ( long entityId ) : Item
entityId long
Résultat Item

GetItemAt() public abstract méthode

Returns the item at the location, or null.
public abstract GetItemAt ( int x, int y ) : Item
x int
y int
Résultat Item

GetItems() public abstract méthode

Returns items that match predicate.
public abstract GetItems ( bool>.Func predicate, StartAt startAt ) : List
predicate bool>.Func
startAt StartAt
Résultat List

Has() public abstract méthode

Returns whether the item exists in this pocket.
public abstract Has ( Item item ) : bool
item Item
Résultat bool

HasSpace() public abstract méthode

Returns true if there's enough space for the item in this pocket.
public abstract HasSpace ( Item item ) : bool
item Item
Résultat bool

InventoryPocket() protected méthode

protected InventoryPocket ( Pocket pocket ) : System
pocket Pocket
Résultat System

Remove() public abstract méthode

Removes item from pocket.
public abstract Remove ( Item item ) : bool
item Item
Résultat bool

Remove() public abstract méthode

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
Résultat int

TryAdd() public abstract méthode

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
Résultat bool