#include <inventorymanager.h>
Public Member Functions | |
IDropAction ()=default | |
IDropAction (std::istream &is) | |
IAction | getType () const |
void | serialize (std::ostream &os) const |
void | apply (InventoryManager *mgr, ServerActiveObject *player, IGameDef *gamedef) |
void | clientApply (InventoryManager *mgr, IGameDef *gamedef) |
Public Member Functions inherited from InventoryAction | |
virtual | ~InventoryAction ()=default |
Public Attributes | |
u16 | count = 0 |
Public Attributes inherited from MoveAction | |
InventoryLocation | from_inv |
std::string | from_list |
s16 | from_i = -1 |
InventoryLocation | to_inv |
std::string | to_list |
s16 | to_i = -1 |
Additional Inherited Members | |
Static Public Member Functions inherited from InventoryAction | |
static InventoryAction * | deSerialize (std::istream &is) |
|
default |
IDropAction::IDropAction | ( | std::istream & | is | ) |
References count, InventoryLocation::deSerialize(), MoveAction::from_i, MoveAction::from_inv, MoveAction::from_list, and stoi.
|
virtual |
Implements InventoryAction.
References count, ItemStack::count, InventoryLocation::DETACHED, InventoryLocation::dump(), ItemStack::empty(), errorstream, MoveAction::from_i, MoveAction::from_inv, MoveAction::from_list, ServerActiveObject::getBasePosition(), InventoryManager::getInventory(), InventoryList::getItem(), Inventory::getList(), infostream, InventoryLocation::NODEMETA, InventoryLocation::PLAYER, PLAYER_TO_SA, IRollbackManager::reportAction(), InventoryList::resizeLock(), IGameDef::rollback(), InventoryLocation::serialize(), InventoryManager::setInventoryModified(), InventoryList::setModified(), RollbackAction::setModifyInventoryStack(), InventoryList::takeItem(), and InventoryLocation::type.
|
virtual |
Implements InventoryAction.
References InventoryList::changeItem(), count, MoveAction::from_i, MoveAction::from_inv, MoveAction::from_list, InventoryManager::getInventory(), Inventory::getList(), InventoryLocation::setCurrentPlayer(), InventoryManager::setInventoryModified(), and InventoryList::takeItem().
|
inlinevirtual |
Implements InventoryAction.
References Drop.
|
inlinevirtual |
Implements InventoryAction.
References count, InventoryLocation::dump(), MoveAction::from_i, MoveAction::from_inv, and MoveAction::from_list.
u16 IDropAction::count = 0 |
Referenced by IDropAction(), apply(), clientApply(), Game::dropSelectedItem(), GUIFormSpecMenu::OnEvent(), and serialize().