C# 클래스 Aura.Channel.World.Inventory.InventoryPocket

파일 보기 프로젝트 열기: aura-project/aura 1 사용 예제들

공개 메소드들

메소드 설명
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