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.
|
|
|
#ifndef GAME_MWMECHANICS_AICAST_H
|
|
|
|
#define GAME_MWMECHANICS_AICAST_H
|
|
|
|
|
|
|
|
#include "typedaipackage.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class Ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
/// AiPackage which makes an actor to cast given spell.
|
|
|
|
class AiCast final : public TypedAiPackage<AiCast> {
|
|
|
|
public:
|
|
|
|
AiCast(const std::string& targetId, const std::string& spellId, bool manualSpell=false);
|
|
|
|
|
|
|
|
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
|
|
|
|
|
|
|
|
int getTypeId() const final;
|
|
|
|
|
|
|
|
MWWorld::Ptr getTarget() const final;
|
|
|
|
|
|
|
|
unsigned int getPriority() const final;
|
|
|
|
|
|
|
|
bool canCancel() const final { return false; }
|
|
|
|
bool shouldCancelPreviousAi() const final { return false; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::string mTargetId;
|
|
|
|
std::string mSpellId;
|
|
|
|
bool mCasting;
|
|
|
|
bool mManual;
|
|
|
|
float mDistance;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|