2012-09-04 11:25:53 +00:00
|
|
|
#ifndef GAME_MWMECHANICS_AISEQUENCE_H
|
|
|
|
#define GAME_MWMECHANICS_AISEQUENCE_H
|
|
|
|
|
|
|
|
#include <list>
|
|
|
|
|
2013-07-30 22:55:08 +00:00
|
|
|
#include <components/esm/loadnpc.hpp>
|
|
|
|
|
2012-09-04 11:25:53 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class Ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
class AiPackage;
|
|
|
|
|
|
|
|
/// \brief Sequence of AI-packages for a single actor
|
|
|
|
class AiSequence
|
|
|
|
{
|
|
|
|
std::list<AiPackage *> mPackages;
|
2013-09-25 16:01:36 +00:00
|
|
|
|
2012-09-04 11:25:53 +00:00
|
|
|
bool mDone;
|
|
|
|
|
|
|
|
void copy (const AiSequence& sequence);
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
AiSequence();
|
|
|
|
|
|
|
|
AiSequence (const AiSequence& sequence);
|
|
|
|
|
|
|
|
AiSequence& operator= (const AiSequence& sequence);
|
|
|
|
|
|
|
|
virtual ~AiSequence();
|
|
|
|
|
|
|
|
int getTypeId() const;
|
2013-11-18 11:33:09 +00:00
|
|
|
///< -1: None, 0: Wanter, 1 Travel, 2 Escort, 3 Follow, 4 Activate, 5 Combat
|
2012-09-04 11:25:53 +00:00
|
|
|
|
|
|
|
bool isPackageDone() const;
|
|
|
|
///< Has a package been completed during the last update?
|
|
|
|
|
2013-10-30 19:42:50 +00:00
|
|
|
void execute (const MWWorld::Ptr& actor,float duration);
|
2012-09-04 11:25:53 +00:00
|
|
|
///< Execute package.
|
|
|
|
|
|
|
|
void clear();
|
|
|
|
///< Remove all packages.
|
2013-11-18 11:33:09 +00:00
|
|
|
|
2012-09-04 11:25:53 +00:00
|
|
|
void stack (const AiPackage& package);
|
|
|
|
///< Add \a package to the front of the sequence (suspends current package)
|
|
|
|
|
|
|
|
void queue (const AiPackage& package);
|
|
|
|
///< Add \a package to the end of the sequence (executed after all other packages have been
|
|
|
|
/// completed)
|
2013-07-30 22:55:08 +00:00
|
|
|
|
|
|
|
void fill (const ESM::AIPackageList& list);
|
2012-09-04 11:25:53 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|