mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-05 12:15:36 +00:00
Move isSummoningEffect to summoning
This commit is contained in:
parent
5535a7fb44
commit
5973285446
5 changed files with 11 additions and 12 deletions
|
@ -27,6 +27,7 @@
|
||||||
#include "actorutil.hpp"
|
#include "actorutil.hpp"
|
||||||
#include "aifollow.hpp"
|
#include "aifollow.hpp"
|
||||||
#include "weapontype.hpp"
|
#include "weapontype.hpp"
|
||||||
|
#include "summoning.hpp"
|
||||||
|
|
||||||
namespace MWMechanics
|
namespace MWMechanics
|
||||||
{
|
{
|
||||||
|
@ -1104,15 +1105,6 @@ namespace MWMechanics
|
||||||
return static_cast<int>((result < 1) ? 1 : result);
|
return static_cast<int>((result < 1) ? 1 : result);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isSummoningEffect(int effectId)
|
|
||||||
{
|
|
||||||
return ((effectId >= ESM::MagicEffect::SummonScamp
|
|
||||||
&& effectId <= ESM::MagicEffect::SummonStormAtronach)
|
|
||||||
|| effectId == ESM::MagicEffect::SummonCenturionSphere
|
|
||||||
|| (effectId >= ESM::MagicEffect::SummonFabricant
|
|
||||||
&& effectId <= ESM::MagicEffect::SummonCreature05));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool disintegrateSlot (MWWorld::Ptr ptr, int slot, float disintegrate)
|
bool disintegrateSlot (MWWorld::Ptr ptr, int slot, float disintegrate)
|
||||||
{
|
{
|
||||||
if (ptr.getClass().hasInventoryStore(ptr))
|
if (ptr.getClass().hasInventoryStore(ptr))
|
||||||
|
|
|
@ -27,8 +27,6 @@ namespace MWMechanics
|
||||||
|
|
||||||
float calcEffectCost(const ESM::ENAMstruct& effect, const ESM::MagicEffect* magicEffect = nullptr);
|
float calcEffectCost(const ESM::ENAMstruct& effect, const ESM::MagicEffect* magicEffect = nullptr);
|
||||||
|
|
||||||
bool isSummoningEffect(int effectId);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param spell spell to cast
|
* @param spell spell to cast
|
||||||
* @param actor calculate spell success chance for this actor (depends on actor's skills)
|
* @param actor calculate spell success chance for this actor (depends on actor's skills)
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "spellcasting.hpp"
|
#include "spellcasting.hpp"
|
||||||
#include "weapontype.hpp"
|
#include "weapontype.hpp"
|
||||||
#include "combat.hpp"
|
#include "combat.hpp"
|
||||||
|
#include "summoning.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,13 +13,19 @@
|
||||||
|
|
||||||
#include "../mwrender/animation.hpp"
|
#include "../mwrender/animation.hpp"
|
||||||
|
|
||||||
#include "spellcasting.hpp"
|
|
||||||
#include "creaturestats.hpp"
|
#include "creaturestats.hpp"
|
||||||
#include "aifollow.hpp"
|
#include "aifollow.hpp"
|
||||||
|
|
||||||
namespace MWMechanics
|
namespace MWMechanics
|
||||||
{
|
{
|
||||||
|
|
||||||
|
bool isSummoningEffect(int effectId)
|
||||||
|
{
|
||||||
|
return ((effectId >= ESM::MagicEffect::SummonScamp && effectId <= ESM::MagicEffect::SummonStormAtronach)
|
||||||
|
|| (effectId == ESM::MagicEffect::SummonCenturionSphere)
|
||||||
|
|| (effectId >= ESM::MagicEffect::SummonFabricant && effectId <= ESM::MagicEffect::SummonCreature05));
|
||||||
|
}
|
||||||
|
|
||||||
std::string getSummonedCreature(int effectId)
|
std::string getSummonedCreature(int effectId)
|
||||||
{
|
{
|
||||||
static const std::map<int, std::string> summonMap
|
static const std::map<int, std::string> summonMap
|
||||||
|
|
|
@ -11,6 +11,8 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
class CreatureStats;
|
class CreatureStats;
|
||||||
|
|
||||||
|
bool isSummoningEffect(int effectId);
|
||||||
|
|
||||||
std::string getSummonedCreature(int effectId);
|
std::string getSummonedCreature(int effectId);
|
||||||
|
|
||||||
struct UpdateSummonedCreatures : public EffectSourceVisitor
|
struct UpdateSummonedCreatures : public EffectSourceVisitor
|
||||||
|
|
Loading…
Reference in a new issue