#include <inventory.h>
◆ ~Inventory()
Inventory::~Inventory |
( |
| ) |
|
◆ Inventory() [1/2]
◆ Inventory() [2/2]
Inventory::Inventory |
( |
const Inventory & | other | ) |
|
◆ addItem()
◆ addList()
InventoryList * Inventory::addList |
( |
const std::string & | name, |
|
|
u32 | size ) |
References InventoryList::clearItems(), getListIndex(), m_itemdef, m_lists, setModified(), InventoryList::setModified(), and InventoryList::setSize().
Referenced by Player::Player(), InvRef::l_set_size(), PlayerDatabaseSQLite3::loadPlayer(), read_inventory_list(), TestMoveAction::testCallbacks(), TestMoveAction::testCallbacksSwap(), TestMoveAction::testMove(), TestMoveAction::testMoveFillStack(), TestMoveAction::testMovePartial(), TestMoveAction::testMoveSomewhere(), TestMoveAction::testMoveSomewherePartial(), TestMoveAction::testMoveUnallowed(), TestMoveAction::testSwap(), TestMoveAction::testSwapFromUnallowed(), and TestMoveAction::testSwapToUnallowed().
◆ checkModified()
bool Inventory::checkModified |
( |
| ) |
const |
|
inline |
◆ clear()
void Inventory::clear |
( |
| ) |
|
◆ deleteList()
bool Inventory::deleteList |
( |
const std::string & | name | ) |
|
◆ deSerialize()
void Inventory::deSerialize |
( |
std::istream & | is | ) |
|
References InventoryList::deSerialize(), errorstream, getList(), m_itemdef, m_lists, setModified(), and InventoryList::setSize().
Referenced by content_nodemeta_deserialize_legacy_body(), NodeMetadata::deSerialize(), Client::handleCommand_DetachedInventory(), Client::handleCommand_Inventory(), PlayerDatabaseLevelDB::loadPlayer(), and TestInventory::testSerializeDeserialize().
◆ getList() [1/2]
References getListIndex(), and m_lists.
Referenced by addItem(), ICraftAction::apply(), IDropAction::apply(), IMoveAction::apply(), RollbackAction::applyRevert(), IDropAction::clientApply(), IMoveAction::clientApply(), content_nodemeta_deserialize_legacy_body(), deSerialize(), GUIInventoryList::draw(), Hud::drawHotbar(), Hud::drawLuaElements(), GUIFormSpecMenu::drawSelectedItem(), getCraftingResult(), GUIInventoryList::getItemIndexAtPos(), InvRef::getlist(), Player::getMaxHotbarItemcount(), Player::getWieldedItem(), InvRef::l_get_list(), InvRef::l_set_list(), InvRef::l_set_size(), InvRef::l_set_width(), GUIFormSpecMenu::OnEvent(), PlayerSAO::setWieldedItem(), Player::setWieldIndex(), TestMoveAction::testMove(), TestMoveAction::testMovePartial(), TestMoveAction::testMoveSomewhere(), TestMoveAction::testMoveSomewherePartial(), TestMoveAction::testMoveUnallowed(), TestInventory::testSerializeDeserialize(), TestMoveAction::testSwap(), TestMoveAction::testSwapFromUnallowed(), TestMoveAction::testSwapToUnallowed(), Server::UpdateCrafting(), GUIFormSpecMenu::updateSelectedItem(), Client::updateWieldedItem(), and GUIFormSpecMenu::verifySelectedItem().
◆ getList() [2/2]
const InventoryList * Inventory::getList |
( |
const std::string & | name | ) |
const |
◆ getListIndex()
s32 Inventory::getListIndex |
( |
const std::string & | name | ) |
const |
|
private |
◆ getLists()
const std::vector< InventoryList * > & Inventory::getLists |
( |
| ) |
const |
|
inline |
◆ operator!=()
bool Inventory::operator!= |
( |
const Inventory & | other | ) |
const |
|
inline |
◆ operator=()
◆ operator==()
bool Inventory::operator== |
( |
const Inventory & | other | ) |
const |
◆ serialize()
void Inventory::serialize |
( |
std::ostream & | os, |
|
|
bool | incremental = false ) const |
◆ setModified()
void Inventory::setModified |
( |
bool | dirty = true | ) |
|
|
inline |
References m_dirty, and m_lists.
Referenced by Inventory(), Player::Player(), addList(), clear(), deleteList(), deSerialize(), operator=(), Server::sendDetachedInventory(), Server::SendInventory(), ServerInventoryManager::setInventoryModified(), and TestInventory::testSerializeDeserialize().
◆ m_dirty
bool Inventory::m_dirty = true |
|
private |
◆ m_itemdef
◆ m_lists
Referenced by addList(), checkModified(), clear(), deleteList(), deSerialize(), getList(), getList(), getListIndex(), getLists(), operator=(), operator==(), serialize(), and setModified().
The documentation for this class was generated from the following files: