OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aiactivate.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWMECHANICS_AIACTIVATE_H
2 #define GAME_MWMECHANICS_AIACTIVATE_H
3 
4 #include "aipackage.hpp"
5 
6 #include <string>
7 
8 #include "pathfinding.hpp"
9 
10 namespace ESM
11 {
12 namespace AiSequence
13 {
14  struct AiActivate;
15 }
16 }
17 
18 namespace MWMechanics
19 {
21 
22  class AiActivate : public AiPackage
23  {
24  public:
26 
27  AiActivate(const std::string &objectId);
28 
29  AiActivate(const ESM::AiSequence::AiActivate* activate);
30 
31  virtual AiActivate *clone() const;
32  virtual bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration);
33  virtual int getTypeId() const;
34 
35  virtual void writeState(ESM::AiSequence::AiSequence& sequence) const;
36 
37  private:
38  std::string mObjectId;
39  };
40 }
41 #endif // GAME_MWMECHANICS_AIACTIVATE_H
Definition: aisequence.hpp:117
Base class for AI packages.
Definition: aipackage.hpp:32
virtual void writeState(ESM::AiSequence::AiSequence &sequence) const
Definition: aiactivate.cpp:56
Definition: character.hpp:145
virtual bool execute(const MWWorld::Ptr &actor, CharacterController &characterController, AiState &state, float duration)
Definition: aiactivate.cpp:26
virtual AiActivate * clone() const
Clones the package.
Definition: aiactivate.cpp:21
Causes actor to walk to activatable object and activate it.
Definition: aiactivate.hpp:22
std::string mObjectId
Definition: aiactivate.hpp:38
Definition: aisequence.hpp:148
virtual int getTypeId() const
Definition: aiactivate.cpp:51
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
AiActivate(const std::string &objectId)
Constructor.
Definition: aiactivate.cpp:16