Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
IDropAction Struct Reference

#include <inventorymanager.h>

+ Inheritance diagram for IDropAction:
+ Collaboration diagram for IDropAction:

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 InventoryActiondeSerialize (std::istream &is)
 

Constructor & Destructor Documentation

◆ IDropAction() [1/2]

IDropAction::IDropAction ( )
default

◆ IDropAction() [2/2]

IDropAction::IDropAction ( std::istream & is)

References count, InventoryLocation::deSerialize(), MoveAction::from_i, MoveAction::from_inv, MoveAction::from_list, and stoi.

+ Here is the call graph for this function:

Member Function Documentation

◆ apply()

◆ clientApply()

void IDropAction::clientApply ( InventoryManager * mgr,
IGameDef * gamedef )
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().

+ Here is the call graph for this function:

◆ getType()

IAction IDropAction::getType ( ) const
inlinevirtual

Implements InventoryAction.

References Drop.

◆ serialize()

void IDropAction::serialize ( std::ostream & os) const
inlinevirtual

Implements InventoryAction.

References count, InventoryLocation::dump(), MoveAction::from_i, MoveAction::from_inv, and MoveAction::from_list.

+ Here is the call graph for this function:

Member Data Documentation

◆ count


The documentation for this struct was generated from the following files: