1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/openmw/mwmechanics/aiactivate.hpp

43 lines
1.1 KiB
C++
Raw Normal View History

2012-11-15 22:22:44 +01:00
#ifndef GAME_MWMECHANICS_AIACTIVATE_H
#define GAME_MWMECHANICS_AIACTIVATE_H
2014-04-01 14:15:55 -04:00
#include "aipackage.hpp"
#include <string>
#include "pathfinding.hpp"
2014-06-12 23:27:04 +02:00
namespace ESM
{
namespace AiSequence
{
struct AiActivate;
}
}
2014-04-01 14:15:55 -04:00
namespace MWMechanics
2014-06-12 23:27:04 +02:00
{
/// \brief Causes actor to walk to activatable object and activate it
/** Will activate when close to object **/
2012-11-16 20:28:20 +01:00
class AiActivate : public AiPackage
2012-11-16 18:38:15 +01:00
{
2014-06-12 23:27:04 +02:00
public:
/// Constructor
/** \param objectId Reference to object to activate **/
AiActivate(const std::string &objectId);
2014-06-12 23:27:04 +02:00
AiActivate(const ESM::AiSequence::AiActivate* activate);
2014-04-01 14:15:55 -04:00
virtual AiActivate *clone() const;
virtual bool execute (const MWWorld::Ptr& actor,float duration);
2012-11-16 18:38:15 +01:00
virtual int getTypeId() const;
2012-11-15 22:22:44 +01:00
2014-06-12 23:27:04 +02:00
virtual void writeState(ESM::AiSequence::AiSequence& sequence) const;
2014-04-01 14:15:55 -04:00
private:
2012-11-16 20:28:20 +01:00
std::string mObjectId;
2014-02-05 16:12:50 +01:00
int mCellX;
int mCellY;
2012-11-16 18:38:15 +01:00
};
2012-11-15 22:22:44 +01:00
}
#endif // GAME_MWMECHANICS_AIACTIVATE_H