import Inventory from 'WTF-Adventure/WTF-Adventure/server/js/game/entity/character/player/containers/inventory/inventory.js'
Inventory
Extends:
Not particularly sure whether or not this class will require an update function to push any updates of the inventory to the client. This is just a baseline setup for the inventory until the interface is done.
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
|
|
public |
loadInventory(ids: *, counts: *, abilities: *, abilityLevels: *) |
|
public |
remove(id: *, count: *, index: *) |
Inherited Summary
From class Container | ||
public |
owner: * |
|
public |
size: * |
|
public |
slots: *[] |
|
public |
type: * |
|
public |
add(id: *, count: *, ability: *, abilityLevel: *): * |
|
public |
canHold(id: *, count: *): * |
|
public |
check() |
|
public |
|
|
public |
containsSpaces(count: *): * |
|
public |
getArray(): {"username": *, "ids": *, "counts": *, "abilities": *, "abilityLevels": *} |
|
public |
getEmptySlot(): * |
|
public |
getIndex(id: *): * |
|
public |
getSlot(id: *): * |
|
public |
hasSpace(): * |
|
public |
loadContainer(ids: *, counts: *, abilities: *, abilityLevels: *) Fill each slot with manual data or the database |
|
public |
|
|
public |
|
Public Constructors
Public Methods
public add(item: *, count: *): boolean source
Override:
Container#addParams:
Name | Type | Attribute | Description |
item | * | ||
count | * |
public loadInventory(ids: *, counts: *, abilities: *, abilityLevels: *) source
Params:
Name | Type | Attribute | Description |
ids | * | ||
counts | * | ||
abilities | * | ||
abilityLevels | * |
public remove(id: *, count: *, index: *) source
Override:
Container#removeParams:
Name | Type | Attribute | Description |
id | * | ||
count | * | ||
index | * |