You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
C++
38 lines
1.0 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
|