|
Rehti MMORPG
1.0.0
Rehti MMORPG is a free and open source MMORPG game.
|
Special case of MoveAction where, at the end, the actor picks up an item. More...
#include <PickUpAction.hpp>


Public Member Functions | |
| PickUpAction (std::chrono::system_clock::time_point startTime, Coordinates target, std::shared_ptr< Entity > pEntity, int targetItemId) | |
| ~PickUpAction ()=default | |
| void | act () |
| Movement functionality, which finds the shortest path to target location and performs the movement there. Implementation of pure virtual method act() of the base class. More... | |
Public Member Functions inherited from MoveAction | |
| MoveAction (std::chrono::system_clock::time_point startTime, Coordinates target, std::shared_ptr< Entity > pEntity) | |
| ~MoveAction ()=default | |
| Coordinates | getTarget () |
| Returns the target location of the action. More... | |
| CurrentAction | getActionInfo () |
| Returns information about the current action. More... | |
Public Member Functions inherited from Action | |
| Action (std::chrono::system_clock::time_point startTime, std::shared_ptr< Entity > pEntity) | |
| ~Action ()=default | |
| std::chrono::system_clock::time_point | getStartTime () |
| Get the time when the action started. More... | |
| std::chrono::milliseconds | getActionTime () |
| Get the time how long a single iteration of the action takes. More... | |
| ActionType | getActionType () |
| Get the ActionType object. More... | |
| bool | isCompleted () |
| Returns true if the action is completed. More... | |
Private Attributes | |
| int | targetItemIdM |
Additional Inherited Members | |
Static Public Member Functions inherited from MoveAction | |
| static const std::chrono::milliseconds | getMoveTime () |
| Get the Move Time object. More... | |
Protected Attributes inherited from MoveAction | |
| Coordinates | targetM |
| std::vector< std::pair< int, int > > | pathM |
| std::optional< Coordinates > | nextMoveM |
| Next move to be taken. Stores the first element of pathM, after its deleted. Ww need this to be able to tell the client where we are moving next. More... | |
| std::chrono::milliseconds | actionTimeM |
| ActionType | actionTypeM = ActionType::Move |
Protected Attributes inherited from Action | |
| std::chrono::system_clock::time_point | startTimeM |
| std::chrono::milliseconds | actionTimeM = std::chrono::milliseconds(0) |
| ActionType | actionTypeM = ActionType::None |
| std::shared_ptr< Entity > | pEntityM |
| bool | completedM = false |
Special case of MoveAction where, at the end, the actor picks up an item.
| PickUpAction::PickUpAction | ( | std::chrono::system_clock::time_point | startTime, |
| Coordinates | target, | ||
| std::shared_ptr< Entity > | pEntity, | ||
| int | targetItemId | ||
| ) |
|
default |
|
virtual |
Movement functionality, which finds the shortest path to target location and performs the movement there. Implementation of pure virtual method act() of the base class.
Reimplemented from MoveAction.
|
private |