1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwmechanics/aisequence.hpp

60 lines
1.5 KiB
C++
Raw Normal View History

#ifndef GAME_MWMECHANICS_AISEQUENCE_H
#define GAME_MWMECHANICS_AISEQUENCE_H
#include <list>
#include <components/esm/loadnpc.hpp>
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
bool mDone;
void copy (const AiSequence& sequence);
public:
AiSequence();
AiSequence (const AiSequence& sequence);
AiSequence& operator= (const AiSequence& sequence);
virtual ~AiSequence();
int getTypeId() const;
///< -1: None, 0: Wanter, 1 Travel, 2 Escort, 3 Follow, 4 Activate, 5 Combat
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);
///< Execute package.
void clear();
///< Remove all packages.
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)
void fill (const ESM::AIPackageList& list);
};
}
#endif