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.
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#ifndef OPENMW_MECHANICS_SUMMONING_H
|
|
#define OPENMW_MECHANICS_SUMMONING_H
|
|
|
|
#include <set>
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
#include <components/esm/magiceffects.hpp>
|
|
|
|
#include "magiceffects.hpp"
|
|
|
|
namespace MWMechanics
|
|
{
|
|
class CreatureStats;
|
|
|
|
bool isSummoningEffect(int effectId);
|
|
|
|
std::string getSummonedCreature(int effectId);
|
|
|
|
void purgeSummonEffect(const MWWorld::Ptr& summoner, const std::pair<const ESM::SummonKey, int>& summon);
|
|
|
|
struct UpdateSummonedCreatures : public EffectSourceVisitor
|
|
{
|
|
UpdateSummonedCreatures(const MWWorld::Ptr& actor);
|
|
virtual ~UpdateSummonedCreatures() = default;
|
|
|
|
void visit (MWMechanics::EffectKey key, int effectIndex,
|
|
const std::string& sourceName, const std::string& sourceId, int casterActorId,
|
|
float magnitude, float remainingTime = -1, float totalTime = -1) override;
|
|
|
|
/// To call after all effect sources have been visited
|
|
void process(bool cleanup);
|
|
|
|
private:
|
|
MWWorld::Ptr mActor;
|
|
|
|
std::set<ESM::SummonKey> mActiveEffects;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|