|
|
@ -9,6 +9,7 @@
|
|
|
|
#include "../mwworld/actionequip.hpp"
|
|
|
|
#include "../mwworld/actionequip.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
#include "../mwmechanics/npcstats.hpp"
|
|
|
|
#include "../mwmechanics/npcstats.hpp"
|
|
|
|
|
|
|
|
#include "../mwmechanics/spellcasting.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
#include <components/esm/loadench.hpp>
|
|
|
|
#include <components/esm/loadench.hpp>
|
|
|
|
#include <components/esm/loadmgef.hpp>
|
|
|
|
#include <components/esm/loadmgef.hpp>
|
|
|
@ -166,6 +167,9 @@ namespace MWMechanics
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const CreatureStats& stats = actor.getClass().getCreatureStats(actor);
|
|
|
|
const CreatureStats& stats = actor.getClass().getCreatureStats(actor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (MWMechanics::getSpellSuccessChance(spell, actor) == 0)
|
|
|
|
|
|
|
|
return 0.f;
|
|
|
|
|
|
|
|
|
|
|
|
if (spell->mData.mType != ESM::Spell::ST_Spell)
|
|
|
|
if (spell->mData.mType != ESM::Spell::ST_Spell)
|
|
|
|
return 0.f;
|
|
|
|
return 0.f;
|
|
|
|
|
|
|
|
|
|
|
|