mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 02:49:55 +00:00
38 lines
1 KiB
C++
38 lines
1 KiB
C++
|
#ifndef GAME_MWMECHANICS_AICAST_H
|
||
|
#define GAME_MWMECHANICS_AICAST_H
|
||
|
|
||
|
#include "../mwbase/world.hpp"
|
||
|
|
||
|
#include "aipackage.hpp"
|
||
|
|
||
|
namespace MWMechanics
|
||
|
{
|
||
|
/// AiPackage which makes an actor to cast given spell.
|
||
|
class AiCast : public AiPackage {
|
||
|
public:
|
||
|
AiCast(const std::string& targetId, const std::string& spellId, bool manualSpell=false);
|
||
|
|
||
|
virtual AiPackage *clone() const;
|
||
|
|
||
|
virtual bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration);
|
||
|
|
||
|
virtual int getTypeId() const;
|
||
|
|
||
|
virtual MWWorld::Ptr getTarget() const;
|
||
|
|
||
|
virtual unsigned int getPriority() const;
|
||
|
|
||
|
virtual bool canCancel() const { return false; }
|
||
|
virtual bool shouldCancelPreviousAi() const { return false; }
|
||
|
|
||
|
private:
|
||
|
std::string mTargetId;
|
||
|
std::string mSpellId;
|
||
|
bool mCasting;
|
||
|
bool mManual;
|
||
|
float mDistance;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|